23550 Posts in 19336 Topics by 2890 members
|Go to End|
20 April 2013 at 11:01pm Last edited: 22 April 2013 3:12am
just played around with the deprecation class introduced with SS 3.0, but got confused a bit.
Currently testing on a clean "SS 3.1-beta3". Inside my module "_config.php" I set "GD::set_default_quality(95)" to increase the thumbnail image quality. The GD class was renamed to GDBackend in SS 3.1 and will throw a deprecation notice from SS 3.2 onwards (activated via code at bottom of "framework/filesystem/GD.php").
When I try to force a deprecation notice (with SS 3.1-beta3) by setting the notification version in "mysite/_config.php" to Deprecation::notification_version('3.2') or 3.3, no notice is thrown at all. Dito for changing notification version in "framework/_config.php". My environment is set to DEV mode, flush=all was excecuted after I changed settings.
Q1: Is it possible to trigger a notification for the GD class this way?
Q2: What is the purpose of the file "framework/silverstripe_version", its not used for the deprecation stuff - right?
21 April 2013 at 11:21pm
think I figured it out myself.
Seems invoking GD::set_default_quality(95) from a module _config.php does not trigger a notification at all. However using the same statement inside a module function triggers the deprecation notice as I was expecting.
Q1: Does anybody know how to set default image quality via a config.yml file?
Q2: Does anybody know how to distinguish between SS versions in config.yml files (e.g. GD::method for SS 3.0-3.1, GDBackend::method for SS >= 3.1)
16 July 2014 at 1:17am Last edited: 16 July 2014 1:18am
To set the image quality via _config/config.yml you can use the following.
|Go to Top|