View
2.069
Download
1
Category
Preview:
Citation preview
3Migrare
a
Developing waterproof PHP Applications
Remember sf1 to Sf2 migration?
Symfony 3 will not be a revolution
sFixing architectural mitakes
• synchronized service
• form
• validation api
• new directory layout
• no more assetic by default?
• remove deprecated code
kingBrea Changes
https://twitter.com/symfony_en/status/651327366636118016
Release Processhttp://symfony.com/doc/current/contributing/community/releases.htmlhttp://symfony.com/roadmap
Semantic versioning (~ 2.4)
X . Y . Z
Semantic versioning (~ 2.4)
X . Y . Zmajor version
allows BC Break
Semantic versioning (~ 2.4)
X . Y . Zminor versionnew features
no BC
Semantic versioning (~ 2.4)
X . Y . Zbug fix
security fix
LTS version
Dealing with deprecated stuff
1 @trigger_error( 2 ’getDefaultOptions() is deprecated since version 2.1 and will be removed in 2.3. Use setDefaultOptions() instead.’, E_USER_DEPRECATED 3 );
1 set_error_handler(function($type, $msg) { 2 file_put_contents( 3 './deprecated.log', 4 $msg //debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS); 5 });
1 <service id="bar" class="stdClass"> 2 <deprecated> 3 The "%service_id%" service is deprecated! 4 </deprecated> 5 </service>
How to migrate
sf < 2.3: upgrade to 2.3
2.3 <= sf <= 2.6: upgrade to 2.7/2.8
sf < 2.3: upgrade to 2.3
2.3 <= sf <= 2.6: upgrade to 2.7/2.8
Min PHP version is 5.5.x
Make your code deprecation free
- fix your code
- update vendors if needed
http://symfony.com/doc/current/cookbook/upgrade/index.html
https://knpuniversity.com/blog/upgrading-symfony-2.7
1 { 2 "...": "...", 3 4 "require": { 5 "symfony/symfony": "3.0.*", 6 }, 7 "...": "..." 8 }
$ composer update symfony/symfony --with-dependencies
https://github.com/symfony/symfony/blob/master/UPGRADE-3.0.md
What about 3rd-party Bundles?
1 "require": { 2 "php": ">=5.4.0", 3 "psr/log": "^1.0", 4 "symfony/framework-bundle": "^2.7|^3.0", 5 "symfony/routing": "^2.7|^3.0", 6 "doctrine/inflector": "^1.0", 7 "willdurand/negotiation": "^2.0", 8 "willdurand/jsonp-callback-validator": "^1.0" 9 }, 10
FOSUserBundle
FOSRestBundle
FOSElasticaBundle
KnpMenuBundle
SonataAdminBundle
HWIOAuthBundle
JMSSecurityExtraBundle
JMSSerializerBundle
JMSI18nRoutingBundle
LiipImagineBundle
NelmioApiDocBundle
VichUploaderBundle
KnpGaufretteBundle
Thanks!
scream https://www.flickr.com/photos/karochkin/3674906958
keep calm: https://en.wikipedia.org/wiki/File:Keep_Calm_and_Carry_On_Poster.svg
cat https://c1.staticflickr.com/5/4005/4406527325_a0213d1fc0_b.jpg
https://c1.staticflickr.com/9/8534/8671901426_a940c6940f_b.jpg
Recommended