Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
3
Migrare
a
Michele Orselli
CTO@Ideato
_orso_
micheleorselli / ideatosrl
mo@ideato.it
Developing waterproof
PHP Applications
Remember sf1 to Sf2
migration?
Symfony 3 will not be
a revolution
s
Fixing architectural mitakes
• synchronized service
• form
• validation api
• new directory layout
• no more assetic by default?
• remove deprecated code
king
Brea Changes
https://twitter.com/symfony_en/status/651327366636118016
Release Process
http://symfony.com/doc/current/contributing/community/releases.html
http://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 version
new 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...
1 set_error_handler(function($type, $msg) {
2 file_put_contents(
3 './deprecated.log',
4 $msg //debug_backtrace(DEBUG_BACK...
1 <service id="bar" class="stdClass">
2 <deprecated>
3 The "%service_id%" service is deprecated!
4 </deprecated>
5 </servi...
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/...
1 {
2 "...": "...",
3
4 "require": {
5 "symfony/symfony": "3.0.*",
6 },
7 "...": "..."
8 }
$ composer update symfony/symfo...
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": "^...
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_Carr...
Migrare a Symfony 3
Migrare a Symfony 3
Migrare a Symfony 3
Migrare a Symfony 3
Migrare a Symfony 3
Migrare a Symfony 3
Migrare a Symfony 3
Migrare a Symfony 3
Migrare a Symfony 3
Migrare a Symfony 3
Migrare a Symfony 3
Migrare a Symfony 3
Migrare a Symfony 3
Migrare a Symfony 3
Migrare a Symfony 3
Migrare a Symfony 3
Migrare a Symfony 3
Upcoming SlideShare
Loading in …5
×

Migrare a Symfony 3

2,380 views

Published on

Con l'arrivo della nuova major release di Symfony è tempo di pensare all'upgrade dei propri progetti...
se siete preoccupati perché vi torna in mente il passaggio da symfony 1 a symfony 2 non temete,
le cose in questo caso saranno molto più semplici (o quasi ;-)).

Tra gli argomenti trattati in questa sessione:
- roadmap del progetto
- gestione delle api deprecate nel core di Symfony
- step per l'upgrade

Published in: Software
  • Be the first to comment

Migrare a Symfony 3

  1. 1. 3 Migrare a
  2. 2. Michele Orselli CTO@Ideato _orso_ micheleorselli / ideatosrl mo@ideato.it
  3. 3. Developing waterproof PHP Applications
  4. 4. Remember sf1 to Sf2 migration?
  5. 5. Symfony 3 will not be a revolution
  6. 6. s Fixing architectural mitakes • synchronized service • form • validation api
  7. 7. • new directory layout • no more assetic by default? • remove deprecated code king Brea Changes
  8. 8. https://twitter.com/symfony_en/status/651327366636118016
  9. 9. Release Process http://symfony.com/doc/current/contributing/community/releases.html http://symfony.com/roadmap
  10. 10. Semantic versioning (~ 2.4) X . Y . Z
  11. 11. Semantic versioning (~ 2.4) X . Y . Zmajor version allows BC Break
  12. 12. Semantic versioning (~ 2.4) X . Y . Zminor version new features no BC
  13. 13. Semantic versioning (~ 2.4) X . Y . Zbug fix security fix
  14. 14. LTS version
  15. 15. Dealing with deprecated stuff
  16. 16. 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 );
  17. 17. 1 set_error_handler(function($type, $msg) { 2 file_put_contents( 3 './deprecated.log', 4 $msg //debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS); 5 });
  18. 18. 1 <service id="bar" class="stdClass"> 2 <deprecated> 3 The "%service_id%" service is deprecated! 4 </deprecated> 5 </service>
  19. 19. How to migrate
  20. 20. sf < 2.3: upgrade to 2.3 2.3 <= sf <= 2.6: upgrade to 2.7/2.8
  21. 21. sf < 2.3: upgrade to 2.3 2.3 <= sf <= 2.6: upgrade to 2.7/2.8
  22. 22. Min PHP version is 5.5.x
  23. 23. 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
  24. 24. 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
  25. 25. What about 3rd-party Bundles?
  26. 26. 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
  27. 27. FOSUserBundle FOSRestBundle FOSElasticaBundle
  28. 28. KnpMenuBundle SonataAdminBundle HWIOAuthBundle
  29. 29. JMSSecurityExtraBundle JMSSerializerBundle JMSI18nRoutingBundle
  30. 30. LiipImagineBundle NelmioApiDocBundle VichUploaderBundle KnpGaufretteBundle
  31. 31. Thanks!
  32. 32. 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

×