SlideShare ist ein Scribd-Unternehmen logo
1 von 59
Downloaden Sie, um offline zu lesen
Jak přežít Symfony 3?
Tomáš Votruba
@votrubaT
Co dělám, když zrovna nepřednáším?
Školím a spoluvytvářím Symfony, Doctrine a Nette
Organizuju Symfony komunity u nás
Programuju Lekarnu.cz
Novinky v Symfony 3
1. vydání verzí
2. deprecations
3. nejzajímavějších novinkách
4. kdy a jak migrovat
Dnes si povíme něco o...
1. Sémantické verzování
- x.y.z BC break
- x.y.z nové featury
- x.y.z bug fixes
1. Co umí jaká verze?
2.8 - všechny nové featury
3.0 = 2.8 bez BC kompatibility
1. Min. PHP verze
1. Jak je to s dobou trvanlivosti?
1. vydání verzí
2. deprecations
3. nejzajímavějších novinkách
4. kdy a jak migrovat
Dnes si povíme něco o...
2. Pryč se starým kódem
2. Štíhlé Symfony po fitku
2. Štíhlé Symfony po fitku
- 10 %
2. Štíhlé Symfony :)
ProFIT!
● rychlejší vývoj
● snazší orientace
● jednoznačné API
1. vydání verzí
2. deprecations
3. nejzajímavějších novinkách
4. kdy a jak migrovat
Dnes si povíme něco o...
3. Změny v adresářové struktuře Symfony fullstack
3. Zaměření na DX (Developer experience)
● autowiring
● debug-bar
● adaptace PSR-3, LoggerInterface
● rozdělení Security:
○ vyčlenění SecurityAclBundle
○ nová komponenta Security Guard
3. Autowiring závislostí služeb
3. Autowiring - zápis služeb dříve
services:
myService:
class: MyBundleMyService
arguments: [ dependency1, dependency2 ]
dependency1:
class: MyBundleDependency1
dependency2:
class: MyBundleDependency2
3. Autowiring - nyní
services:
myService:
class: MyBundleMyService
autowire: true
3. Autowiring - nyní
services:
myService:
class: MyBundleMyService
autowire: true
DI naparsuje konstruktor a:
- pokud jsou služby dostupné, předá je
- pokud ne, registruje je jako privátní služby
3. Autowiring - a co interface?
services:
myService:
class: MyBundleMyService
autowire: true
3. Autowiring - a když je více stejných interfaců?
services:
myService:
class: MyBundleMyService
autowire: true
dependency1:
class: MyBundleDependency1
autowiring_types: MyBundleMyInterface
3. Nová komponenta: Polyfil
3. Nová komponenta: Polyfil
- podpora nových features v PHP do starších verzí
- řeší kompatibilitu PHP pro některá extension a funkce
- vhodná pro portabilitu napříč různými verzemi PHP
Use case:
- password_hash a password_* funkce od PHP 5.5 (balíček)
ircmaxell/password-compat)
3. Symfony profiler je šik
1. vydání verzí
2. deprecations
3. nejzajímavějších novinkách
4. kdy a jak migrovat
Dnes si povíme něco o...
4. Proč migrovat?
- protože Symfony je super!
4. Proč migrovat?
- protože Symfony je super!
4. Proč migrovat?
- protože Symfony je super!
- raději kvůli businessu
- potřebujete nové features
- chcete upgradovat i PHP (min PHP 5.5)
4. Jak migrovat?
● Symfony < 2.3: na 2.3
● Symfony < 2.7: na 2.7
● Symfony 2.7: na 2.8 (vyjde souběžně s 3.0)
4. Jak najít deprecated kód
4. PHPUnitBridge
composer require symfony/phpunit-bridge --dev
git clone git@github.com:sensiolabs-in/deprecation-detector.git
cd deprecation-detector
composer install
bin/deprecation-detector your-vendor
4. Deprecation detector
4. A co na to bundly?
FOSUserBundle FOSRestBundle
FOSElasticaBundle DoctrineBundle
SonataAdminBundle
KnpMenuBundle
Vyzkoušej si Symfony 3 na vlastní kůži
SENSIOLABS_ENABLE_NEW_DIRECTORY_STRUCTURE=true composer create-
project symfony/framework-standard-edition myproject @dev
cd myproject
php bin/console server:run localhost:8001
Otevřeš v prohlížeči http://localhost:8001 …
Jak teda zvládneš Symfony 3 a...
Lepší DX?
Nové featury?
Best practices?
LIKE A BOSS!
Díky za pozornost
Chceš se o Symfony 3 dozvědět víc?
Pobavme se o tom osobně :)
www.tomasvotruba.cz

Weitere ähnliche Inhalte

Empfohlen

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by HubspotMarius Sescu
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTExpeed Software
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsPixeldarts
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthThinkNow
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfmarketingartwork
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024Neil Kimberley
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)contently
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024Albert Qian
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsKurio // The Social Media Age(ncy)
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Search Engine Journal
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summarySpeakerHub
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next Tessa Mero
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentLily Ray
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best PracticesVit Horky
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project managementMindGenius
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...RachelPearson36
 

Empfohlen (20)

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 

Jak přežít symfony 3 - 1. sraz přátel Symfony v Praze (in Czech)

  • 1. Jak přežít Symfony 3? Tomáš Votruba @votrubaT
  • 2. Co dělám, když zrovna nepřednáším? Školím a spoluvytvářím Symfony, Doctrine a Nette Organizuju Symfony komunity u nás Programuju Lekarnu.cz
  • 4.
  • 5.
  • 6.
  • 7. 1. vydání verzí 2. deprecations 3. nejzajímavějších novinkách 4. kdy a jak migrovat Dnes si povíme něco o...
  • 8. 1. Sémantické verzování - x.y.z BC break - x.y.z nové featury - x.y.z bug fixes
  • 9. 1. Co umí jaká verze? 2.8 - všechny nové featury 3.0 = 2.8 bez BC kompatibility
  • 10. 1. Min. PHP verze
  • 11.
  • 12.
  • 13.
  • 14. 1. Jak je to s dobou trvanlivosti?
  • 15.
  • 16.
  • 17.
  • 18. 1. vydání verzí 2. deprecations 3. nejzajímavějších novinkách 4. kdy a jak migrovat Dnes si povíme něco o...
  • 19. 2. Pryč se starým kódem
  • 21. 2. Štíhlé Symfony po fitku - 10 %
  • 22. 2. Štíhlé Symfony :) ProFIT! ● rychlejší vývoj ● snazší orientace ● jednoznačné API
  • 23. 1. vydání verzí 2. deprecations 3. nejzajímavějších novinkách 4. kdy a jak migrovat Dnes si povíme něco o...
  • 24. 3. Změny v adresářové struktuře Symfony fullstack
  • 25.
  • 26.
  • 27. 3. Zaměření na DX (Developer experience) ● autowiring ● debug-bar ● adaptace PSR-3, LoggerInterface ● rozdělení Security: ○ vyčlenění SecurityAclBundle ○ nová komponenta Security Guard
  • 28.
  • 29.
  • 31. 3. Autowiring - zápis služeb dříve services: myService: class: MyBundleMyService arguments: [ dependency1, dependency2 ] dependency1: class: MyBundleDependency1 dependency2: class: MyBundleDependency2
  • 32. 3. Autowiring - nyní services: myService: class: MyBundleMyService autowire: true
  • 33. 3. Autowiring - nyní services: myService: class: MyBundleMyService autowire: true DI naparsuje konstruktor a: - pokud jsou služby dostupné, předá je - pokud ne, registruje je jako privátní služby
  • 34. 3. Autowiring - a co interface? services: myService: class: MyBundleMyService autowire: true
  • 35. 3. Autowiring - a když je více stejných interfaců? services: myService: class: MyBundleMyService autowire: true dependency1: class: MyBundleDependency1 autowiring_types: MyBundleMyInterface
  • 37. 3. Nová komponenta: Polyfil - podpora nových features v PHP do starších verzí - řeší kompatibilitu PHP pro některá extension a funkce - vhodná pro portabilitu napříč různými verzemi PHP Use case: - password_hash a password_* funkce od PHP 5.5 (balíček) ircmaxell/password-compat)
  • 39.
  • 40.
  • 41.
  • 42.
  • 43. 1. vydání verzí 2. deprecations 3. nejzajímavějších novinkách 4. kdy a jak migrovat Dnes si povíme něco o...
  • 44. 4. Proč migrovat? - protože Symfony je super!
  • 45. 4. Proč migrovat? - protože Symfony je super!
  • 46. 4. Proč migrovat? - protože Symfony je super! - raději kvůli businessu - potřebujete nové features - chcete upgradovat i PHP (min PHP 5.5)
  • 47. 4. Jak migrovat? ● Symfony < 2.3: na 2.3 ● Symfony < 2.7: na 2.7 ● Symfony 2.7: na 2.8 (vyjde souběžně s 3.0)
  • 48. 4. Jak najít deprecated kód
  • 49.
  • 50. 4. PHPUnitBridge composer require symfony/phpunit-bridge --dev
  • 51.
  • 52. git clone git@github.com:sensiolabs-in/deprecation-detector.git cd deprecation-detector composer install bin/deprecation-detector your-vendor 4. Deprecation detector
  • 53.
  • 54. 4. A co na to bundly? FOSUserBundle FOSRestBundle FOSElasticaBundle DoctrineBundle SonataAdminBundle KnpMenuBundle
  • 55. Vyzkoušej si Symfony 3 na vlastní kůži SENSIOLABS_ENABLE_NEW_DIRECTORY_STRUCTURE=true composer create- project symfony/framework-standard-edition myproject @dev cd myproject php bin/console server:run localhost:8001 Otevřeš v prohlížeči http://localhost:8001 …
  • 56.
  • 57. Jak teda zvládneš Symfony 3 a... Lepší DX? Nové featury? Best practices?
  • 59. Díky za pozornost Chceš se o Symfony 3 dozvědět víc? Pobavme se o tom osobně :) www.tomasvotruba.cz