symfony live san francisco 2017 - symfony @ opensky
TRANSCRIPT
![Page 1: Symfony Live San Francisco 2017 - Symfony @ OpenSky](https://reader031.vdocuments.net/reader031/viewer/2022021422/5a6479ef7f8b9a46568b4781/html5/thumbnails/1.jpg)
Symfony @ OpenSkyPablo Godel
![Page 2: Symfony Live San Francisco 2017 - Symfony @ OpenSky](https://reader031.vdocuments.net/reader031/viewer/2022021422/5a6479ef7f8b9a46568b4781/html5/thumbnails/2.jpg)
Symfony @ OpenSky
What is OpenSky?
![Page 3: Symfony Live San Francisco 2017 - Symfony @ OpenSky](https://reader031.vdocuments.net/reader031/viewer/2022021422/5a6479ef7f8b9a46568b4781/html5/thumbnails/3.jpg)
Symfony @ OpenSky
What is OpenSky?• Multiple businesses powered by Symfony:
1. opensky.com 2. dotandbo.com 3. 55mulberry.com
![Page 4: Symfony Live San Francisco 2017 - Symfony @ OpenSky](https://reader031.vdocuments.net/reader031/viewer/2022021422/5a6479ef7f8b9a46568b4781/html5/thumbnails/4.jpg)
Symfony @ OpenSky
What is OpenSky?• Multiple businesses powered by Symfony:
1. opensky.com 2. dotandbo.com 3. 55mulberry.com
• +100 employees
![Page 5: Symfony Live San Francisco 2017 - Symfony @ OpenSky](https://reader031.vdocuments.net/reader031/viewer/2022021422/5a6479ef7f8b9a46568b4781/html5/thumbnails/5.jpg)
Symfony @ OpenSky
What is OpenSky?• Multiple businesses powered by Symfony:
1. opensky.com 2. dotandbo.com 3. 55mulberry.com
• +100 employees • Offices all around the world in New York,
Portland, Nashville, Miami, Chico, Bucharest and Los Angeles
![Page 6: Symfony Live San Francisco 2017 - Symfony @ OpenSky](https://reader031.vdocuments.net/reader031/viewer/2022021422/5a6479ef7f8b9a46568b4781/html5/thumbnails/6.jpg)
Symfony @ OpenSky
HISTORY
![Page 7: Symfony Live San Francisco 2017 - Symfony @ OpenSky](https://reader031.vdocuments.net/reader031/viewer/2022021422/5a6479ef7f8b9a46568b4781/html5/thumbnails/7.jpg)
Symfony @ OpenSky
HISTORY
![Page 8: Symfony Live San Francisco 2017 - Symfony @ OpenSky](https://reader031.vdocuments.net/reader031/viewer/2022021422/5a6479ef7f8b9a46568b4781/html5/thumbnails/8.jpg)
Symfony @ OpenSky
• Early adopter of Symfony2 in 2010 before 2.0 stable was released
History
![Page 9: Symfony Live San Francisco 2017 - Symfony @ OpenSky](https://reader031.vdocuments.net/reader031/viewer/2022021422/5a6479ef7f8b9a46568b4781/html5/thumbnails/9.jpg)
Symfony @ OpenSky
• Early adopter of Symfony2 in 2010 before 2.0 stable was released
• Migrated from Magento -> symfony1 -> Symfony2
History
![Page 10: Symfony Live San Francisco 2017 - Symfony @ OpenSky](https://reader031.vdocuments.net/reader031/viewer/2022021422/5a6479ef7f8b9a46568b4781/html5/thumbnails/10.jpg)
Symfony @ OpenSky
• Early adopter of Symfony2 in 2010 before 2.0 stable was released
• Migrated from Magento -> symfony1 -> Symfony2
• Aspects of Magento cart utilized throughout migration process until completely phased out with proprietary cart/checkout technology
History
![Page 11: Symfony Live San Francisco 2017 - Symfony @ OpenSky](https://reader031.vdocuments.net/reader031/viewer/2022021422/5a6479ef7f8b9a46568b4781/html5/thumbnails/11.jpg)
Symfony @ OpenSky
THE CURRENT STACK
![Page 12: Symfony Live San Francisco 2017 - Symfony @ OpenSky](https://reader031.vdocuments.net/reader031/viewer/2022021422/5a6479ef7f8b9a46568b4781/html5/thumbnails/12.jpg)
Symfony @ OpenSky
• Symfony 2.8 • RequireJS + Backbone • PHP 7.1.10 • MySQL 5.6 + MongoDB 3.2 • Redis • Varnish + Nginx • VMWare • Vagrant + VirtualBox for Dev VMs
The Current Stack
![Page 13: Symfony Live San Francisco 2017 - Symfony @ OpenSky](https://reader031.vdocuments.net/reader031/viewer/2022021422/5a6479ef7f8b9a46568b4781/html5/thumbnails/13.jpg)
Symfony @ OpenSky
• ~400 Controllers • +800 Routes • ~1,900 Services • 285 Commands • 374 Entities • 467 Documents • 808,532 LoC • 3,738 Classes • 156 Interfaces • 46 Traits • +10,000 Unit Tests
The Current Stack
![Page 14: Symfony Live San Francisco 2017 - Symfony @ OpenSky](https://reader031.vdocuments.net/reader031/viewer/2022021422/5a6479ef7f8b9a46568b4781/html5/thumbnails/14.jpg)
Symfony @ OpenSky
The Current Stack
![Page 15: Symfony Live San Francisco 2017 - Symfony @ OpenSky](https://reader031.vdocuments.net/reader031/viewer/2022021422/5a6479ef7f8b9a46568b4781/html5/thumbnails/15.jpg)
Symfony @ OpenSky
The Current Stack
![Page 16: Symfony Live San Francisco 2017 - Symfony @ OpenSky](https://reader031.vdocuments.net/reader031/viewer/2022021422/5a6479ef7f8b9a46568b4781/html5/thumbnails/16.jpg)
Symfony @ OpenSky
CODING WORKFLOW
![Page 17: Symfony Live San Francisco 2017 - Symfony @ OpenSky](https://reader031.vdocuments.net/reader031/viewer/2022021422/5a6479ef7f8b9a46568b4781/html5/thumbnails/17.jpg)
Symfony @ OpenSky
Symfony at OpenSkyGitHub Enterprise
GitHub Enterprise
Coding workflow
![Page 18: Symfony Live San Francisco 2017 - Symfony @ OpenSky](https://reader031.vdocuments.net/reader031/viewer/2022021422/5a6479ef7f8b9a46568b4781/html5/thumbnails/18.jpg)
Symfony @ OpenSky
• production branch (master)
Coding workflow
![Page 19: Symfony Live San Francisco 2017 - Symfony @ OpenSky](https://reader031.vdocuments.net/reader031/viewer/2022021422/5a6479ef7f8b9a46568b4781/html5/thumbnails/19.jpg)
Symfony @ OpenSky
• production branch (master) • feature / fix branches
Coding workflow
![Page 20: Symfony Live San Francisco 2017 - Symfony @ OpenSky](https://reader031.vdocuments.net/reader031/viewer/2022021422/5a6479ef7f8b9a46568b4781/html5/thumbnails/20.jpg)
Symfony @ OpenSky
• production branch (master) • feature / fix branches • Pull Requests linked to JIRA
Coding workflow
![Page 21: Symfony Live San Francisco 2017 - Symfony @ OpenSky](https://reader031.vdocuments.net/reader031/viewer/2022021422/5a6479ef7f8b9a46568b4781/html5/thumbnails/21.jpg)
Symfony @ OpenSky
• production branch (master) • feature / fix branches • Pull Requests linked to JIRA • Integration with Jenkins for Unit/
Functional Tests
Coding workflow
![Page 22: Symfony Live San Francisco 2017 - Symfony @ OpenSky](https://reader031.vdocuments.net/reader031/viewer/2022021422/5a6479ef7f8b9a46568b4781/html5/thumbnails/22.jpg)
Symfony @ OpenSky
• production branch (master) • feature / fix branches • Pull Requests linked to JIRA • Integration with Jenkins for Unit/
Functional Tests • Pre-commit Hooks for php-cs-fixer,
gulp-jshint, gulp-sass-lint
Coding workflow
![Page 23: Symfony Live San Francisco 2017 - Symfony @ OpenSky](https://reader031.vdocuments.net/reader031/viewer/2022021422/5a6479ef7f8b9a46568b4781/html5/thumbnails/23.jpg)
Symfony @ OpenSky
• Symfony Coding Standards
Coding workflow
![Page 24: Symfony Live San Francisco 2017 - Symfony @ OpenSky](https://reader031.vdocuments.net/reader031/viewer/2022021422/5a6479ef7f8b9a46568b4781/html5/thumbnails/24.jpg)
Symfony @ OpenSky
• Symfony Coding Standards • Short Array Syntax
Coding workflow
![Page 25: Symfony Live San Francisco 2017 - Symfony @ OpenSky](https://reader031.vdocuments.net/reader031/viewer/2022021422/5a6479ef7f8b9a46568b4781/html5/thumbnails/25.jpg)
Symfony @ OpenSky
• Symfony Coding Standards • Short Array Syntax • Ordered Use Statements
Coding workflow
![Page 26: Symfony Live San Francisco 2017 - Symfony @ OpenSky](https://reader031.vdocuments.net/reader031/viewer/2022021422/5a6479ef7f8b9a46568b4781/html5/thumbnails/26.jpg)
Symfony @ OpenSky
• Symfony Coding Standards • Short Array Syntax • Ordered Use Statements • Ensuring an EOL at end of file
Coding workflow
![Page 27: Symfony Live San Francisco 2017 - Symfony @ OpenSky](https://reader031.vdocuments.net/reader031/viewer/2022021422/5a6479ef7f8b9a46568b4781/html5/thumbnails/27.jpg)
Symfony @ OpenSky
• PHP7 Type-Hints when possible
Coding workflow
![Page 28: Symfony Live San Francisco 2017 - Symfony @ OpenSky](https://reader031.vdocuments.net/reader031/viewer/2022021422/5a6479ef7f8b9a46568b4781/html5/thumbnails/28.jpg)
Symfony @ OpenSky
• PHP7 Type-Hints when possible • DocBlocks only when adds clarity
Coding workflow
![Page 29: Symfony Live San Francisco 2017 - Symfony @ OpenSky](https://reader031.vdocuments.net/reader031/viewer/2022021422/5a6479ef7f8b9a46568b4781/html5/thumbnails/29.jpg)
Symfony @ OpenSky
• PHP7 Type-Hints when possible • DocBlocks only when adds clarity • ClassName::class
Coding workflow
![Page 30: Symfony Live San Francisco 2017 - Symfony @ OpenSky](https://reader031.vdocuments.net/reader031/viewer/2022021422/5a6479ef7f8b9a46568b4781/html5/thumbnails/30.jpg)
Symfony @ OpenSky
• PHP7 Type-Hints when possible • DocBlocks only when adds clarity • ClassName::class
• ‘\Namespace\ClassName’
Coding workflow
![Page 31: Symfony Live San Francisco 2017 - Symfony @ OpenSky](https://reader031.vdocuments.net/reader031/viewer/2022021422/5a6479ef7f8b9a46568b4781/html5/thumbnails/31.jpg)
Symfony @ OpenSky
• PHP7 Type-Hints when possible • DocBlocks only when adds clarity • ClassName::class
• ‘\Namespace\ClassName’ • In forms use class constant
Coding workflow
![Page 32: Symfony Live San Francisco 2017 - Symfony @ OpenSky](https://reader031.vdocuments.net/reader031/viewer/2022021422/5a6479ef7f8b9a46568b4781/html5/thumbnails/32.jpg)
Symfony @ OpenSky
• PHP7 Type-Hints when possible • DocBlocks only when adds clarity • ClassName::class
• ‘\Namespace\ClassName’ • In forms use class constant
• $builder->add('name', TextType::class);
Coding workflow
![Page 33: Symfony Live San Francisco 2017 - Symfony @ OpenSky](https://reader031.vdocuments.net/reader031/viewer/2022021422/5a6479ef7f8b9a46568b4781/html5/thumbnails/33.jpg)
Symfony @ OpenSky
• PHP7 Type-Hints when possible • DocBlocks only when adds clarity • ClassName::class
• ‘\Namespace\ClassName’ • In forms use class constant
• $builder->add('name', TextType::class); • Always use ‘use’ statement
• $time = new \DateTime()
Coding workflow
![Page 34: Symfony Live San Francisco 2017 - Symfony @ OpenSky](https://reader031.vdocuments.net/reader031/viewer/2022021422/5a6479ef7f8b9a46568b4781/html5/thumbnails/34.jpg)
Symfony @ OpenSky
Before production deployment:
Coding workflow
![Page 35: Symfony Live San Francisco 2017 - Symfony @ OpenSky](https://reader031.vdocuments.net/reader031/viewer/2022021422/5a6479ef7f8b9a46568b4781/html5/thumbnails/35.jpg)
Symfony @ OpenSky
Before production deployment: • Peer Reviews using GitHub PRs
Coding workflow
![Page 36: Symfony Live San Francisco 2017 - Symfony @ OpenSky](https://reader031.vdocuments.net/reader031/viewer/2022021422/5a6479ef7f8b9a46568b4781/html5/thumbnails/36.jpg)
Symfony @ OpenSky
Before production deployment: • Peer Reviews using GitHub PRs • 100% test pass (unit & functional)
Coding workflow
![Page 37: Symfony Live San Francisco 2017 - Symfony @ OpenSky](https://reader031.vdocuments.net/reader031/viewer/2022021422/5a6479ef7f8b9a46568b4781/html5/thumbnails/37.jpg)
Symfony @ OpenSky
Before production deployment: • Peer Reviews using GitHub PRs • 100% test pass (unit & functional) • Integration deploy/testing
Coding workflow
![Page 38: Symfony Live San Francisco 2017 - Symfony @ OpenSky](https://reader031.vdocuments.net/reader031/viewer/2022021422/5a6479ef7f8b9a46568b4781/html5/thumbnails/38.jpg)
Symfony @ OpenSky
Before production deployment: • Peer Reviews using GitHub PRs • 100% test pass (unit & functional) • Integration deploy/testing • UA / QA pass (tracked in JIRA)
Coding workflow
![Page 39: Symfony Live San Francisco 2017 - Symfony @ OpenSky](https://reader031.vdocuments.net/reader031/viewer/2022021422/5a6479ef7f8b9a46568b4781/html5/thumbnails/39.jpg)
Symfony @ OpenSky
SYMFONY BUNDLES
![Page 40: Symfony Live San Francisco 2017 - Symfony @ OpenSky](https://reader031.vdocuments.net/reader031/viewer/2022021422/5a6479ef7f8b9a46568b4781/html5/thumbnails/40.jpg)
Symfony @ OpenSky
• Split things into broad bundles. Don’t over bundle.
Symfony Bundles
![Page 41: Symfony Live San Francisco 2017 - Symfony @ OpenSky](https://reader031.vdocuments.net/reader031/viewer/2022021422/5a6479ef7f8b9a46568b4781/html5/thumbnails/41.jpg)
Symfony @ OpenSky
• Split things into broad bundles. Don’t over bundle. • MainBundle
Symfony Bundles
![Page 42: Symfony Live San Francisco 2017 - Symfony @ OpenSky](https://reader031.vdocuments.net/reader031/viewer/2022021422/5a6479ef7f8b9a46568b4781/html5/thumbnails/42.jpg)
Symfony @ OpenSky
• Split things into broad bundles. Don’t over bundle. • MainBundle • AdminBundle (500+ routes, 300 extra
services in the container)
Symfony Bundles
![Page 43: Symfony Live San Francisco 2017 - Symfony @ OpenSky](https://reader031.vdocuments.net/reader031/viewer/2022021422/5a6479ef7f8b9a46568b4781/html5/thumbnails/43.jpg)
Symfony @ OpenSky
• Split things into broad bundles. Don’t over bundle. • MainBundle • AdminBundle (500+ routes, 300 extra
services in the container) • APIBundle
Symfony Bundles
![Page 44: Symfony Live San Francisco 2017 - Symfony @ OpenSky](https://reader031.vdocuments.net/reader031/viewer/2022021422/5a6479ef7f8b9a46568b4781/html5/thumbnails/44.jpg)
Symfony @ OpenSky
• Split things into broad bundles. Don’t over bundle. • MainBundle • AdminBundle (500+ routes, 300 extra
services in the container) • APIBundle
• 3rd Party Bundles
Symfony Bundles
![Page 45: Symfony Live San Francisco 2017 - Symfony @ OpenSky](https://reader031.vdocuments.net/reader031/viewer/2022021422/5a6479ef7f8b9a46568b4781/html5/thumbnails/45.jpg)
Symfony @ OpenSky
• Split things into broad bundles. Don’t over bundle. • MainBundle • AdminBundle (500+ routes, 300 extra
services in the container) • APIBundle
• 3rd Party Bundles • AvalancheImagineBundle
Symfony Bundles
![Page 46: Symfony Live San Francisco 2017 - Symfony @ OpenSky](https://reader031.vdocuments.net/reader031/viewer/2022021422/5a6479ef7f8b9a46568b4781/html5/thumbnails/46.jpg)
Symfony @ OpenSky
• Split things into broad bundles. Don’t over bundle. • MainBundle • AdminBundle (500+ routes, 300 extra
services in the container) • APIBundle
• 3rd Party Bundles • AvalancheImagineBundle • FOSUserBundle
Symfony Bundles
![Page 47: Symfony Live San Francisco 2017 - Symfony @ OpenSky](https://reader031.vdocuments.net/reader031/viewer/2022021422/5a6479ef7f8b9a46568b4781/html5/thumbnails/47.jpg)
Symfony @ OpenSky
• Split things into broad bundles. Don’t over bundle. • MainBundle • AdminBundle (500+ routes, 300 extra
services in the container) • APIBundle
• 3rd Party Bundles • AvalancheImagineBundle • FOSUserBundle • Using 3rd party bundles may impact
maintainability in the long term
Symfony Bundles
![Page 48: Symfony Live San Francisco 2017 - Symfony @ OpenSky](https://reader031.vdocuments.net/reader031/viewer/2022021422/5a6479ef7f8b9a46568b4781/html5/thumbnails/48.jpg)
Symfony @ OpenSky
DOCTRINE
![Page 49: Symfony Live San Francisco 2017 - Symfony @ OpenSky](https://reader031.vdocuments.net/reader031/viewer/2022021422/5a6479ef7f8b9a46568b4781/html5/thumbnails/49.jpg)
Symfony @ OpenSky
• MongoDB and MySQL together
Doctrine
![Page 50: Symfony Live San Francisco 2017 - Symfony @ OpenSky](https://reader031.vdocuments.net/reader031/viewer/2022021422/5a6479ef7f8b9a46568b4781/html5/thumbnails/50.jpg)
Symfony @ OpenSky
• MongoDB and MySQL together • References between MongoDB and MySQL
Doctrine
![Page 51: Symfony Live San Francisco 2017 - Symfony @ OpenSky](https://reader031.vdocuments.net/reader031/viewer/2022021422/5a6479ef7f8b9a46568b4781/html5/thumbnails/51.jpg)
Symfony @ OpenSky
• MongoDB and MySQL together • References between MongoDB and MySQL • Using the Doctrine ORM & MongoDB ODM to
make the models for the two databases transparent to the application.
Doctrine
![Page 52: Symfony Live San Francisco 2017 - Symfony @ OpenSky](https://reader031.vdocuments.net/reader031/viewer/2022021422/5a6479ef7f8b9a46568b4781/html5/thumbnails/52.jpg)
Symfony @ OpenSky
• MongoDB and MySQL together • References between MongoDB and MySQL • Using the Doctrine ORM & MongoDB ODM to
make the models for the two databases transparent to the application.
• Never delete data due to referential integrity problems. Use soft delete (deletedAt)
Doctrine
![Page 53: Symfony Live San Francisco 2017 - Symfony @ OpenSky](https://reader031.vdocuments.net/reader031/viewer/2022021422/5a6479ef7f8b9a46568b4781/html5/thumbnails/53.jpg)
Symfony @ OpenSky
• MongoDB and MySQL together • References between MongoDB and MySQL • Using the Doctrine ORM & MongoDB ODM to
make the models for the two databases transparent to the application.
• Never delete data due to referential integrity problems. Use soft delete (deletedAt)
• Traits for common functionality like createdAt/updatedAt/deletedAt
Doctrine
![Page 54: Symfony Live San Francisco 2017 - Symfony @ OpenSky](https://reader031.vdocuments.net/reader031/viewer/2022021422/5a6479ef7f8b9a46568b4781/html5/thumbnails/54.jpg)
Symfony @ OpenSky
![Page 55: Symfony Live San Francisco 2017 - Symfony @ OpenSky](https://reader031.vdocuments.net/reader031/viewer/2022021422/5a6479ef7f8b9a46568b4781/html5/thumbnails/55.jpg)
Symfony @ OpenSky
• How long did it take to run?
Doctrine Migrations
![Page 56: Symfony Live San Francisco 2017 - Symfony @ OpenSky](https://reader031.vdocuments.net/reader031/viewer/2022021422/5a6479ef7f8b9a46568b4781/html5/thumbnails/56.jpg)
Symfony @ OpenSky
• How long did it take to run? • Is it backwards compatible?
Doctrine Migrations
![Page 57: Symfony Live San Francisco 2017 - Symfony @ OpenSky](https://reader031.vdocuments.net/reader031/viewer/2022021422/5a6479ef7f8b9a46568b4781/html5/thumbnails/57.jpg)
Symfony @ OpenSky
• How long did it take to run? • Is it backwards compatible? • Up & Down
Doctrine Migrations
![Page 58: Symfony Live San Francisco 2017 - Symfony @ OpenSky](https://reader031.vdocuments.net/reader031/viewer/2022021422/5a6479ef7f8b9a46568b4781/html5/thumbnails/58.jpg)
Symfony @ OpenSky
• How long did it take to run? • Is it backwards compatible? • Up & Down • schema.sql / data.sql up-to-date
Doctrine Migrations
![Page 59: Symfony Live San Francisco 2017 - Symfony @ OpenSky](https://reader031.vdocuments.net/reader031/viewer/2022021422/5a6479ef7f8b9a46568b4781/html5/thumbnails/59.jpg)
Symfony @ OpenSky
• How long did it take to run? • Is it backwards compatible? • Up & Down • schema.sql / data.sql up-to-date • Add indexes
Doctrine Migrations
![Page 60: Symfony Live San Francisco 2017 - Symfony @ OpenSky](https://reader031.vdocuments.net/reader031/viewer/2022021422/5a6479ef7f8b9a46568b4781/html5/thumbnails/60.jpg)
Symfony @ OpenSky
• How long did it take to run? • Is it backwards compatible? • Up & Down • schema.sql / data.sql up-to-date • Add indexes • Remove data later in separate
migration
Doctrine Migrations
![Page 61: Symfony Live San Francisco 2017 - Symfony @ OpenSky](https://reader031.vdocuments.net/reader031/viewer/2022021422/5a6479ef7f8b9a46568b4781/html5/thumbnails/61.jpg)
Symfony @ OpenSky
SYMFONY MISC
![Page 62: Symfony Live San Francisco 2017 - Symfony @ OpenSky](https://reader031.vdocuments.net/reader031/viewer/2022021422/5a6479ef7f8b9a46568b4781/html5/thumbnails/62.jpg)
Symfony @ OpenSky
• Lean
Controllers
![Page 63: Symfony Live San Francisco 2017 - Symfony @ OpenSky](https://reader031.vdocuments.net/reader031/viewer/2022021422/5a6479ef7f8b9a46568b4781/html5/thumbnails/63.jpg)
Symfony @ OpenSky
• Lean • No Business Logic
Controllers
![Page 64: Symfony Live San Francisco 2017 - Symfony @ OpenSky](https://reader031.vdocuments.net/reader031/viewer/2022021422/5a6479ef7f8b9a46568b4781/html5/thumbnails/64.jpg)
Symfony @ OpenSky
• Lean • No Business Logic • Only Flow control
Controllers
![Page 65: Symfony Live San Francisco 2017 - Symfony @ OpenSky](https://reader031.vdocuments.net/reader031/viewer/2022021422/5a6479ef7f8b9a46568b4781/html5/thumbnails/65.jpg)
Symfony @ OpenSky
• Lean • No Business Logic • Only Flow control • Extend Custom BaseController
Controllers
![Page 66: Symfony Live San Francisco 2017 - Symfony @ OpenSky](https://reader031.vdocuments.net/reader031/viewer/2022021422/5a6479ef7f8b9a46568b4781/html5/thumbnails/66.jpg)
Symfony @ OpenSky
• Two tiers of authentication implemented using role voters.
Security
![Page 67: Symfony Live San Francisco 2017 - Symfony @ OpenSky](https://reader031.vdocuments.net/reader031/viewer/2022021422/5a6479ef7f8b9a46568b4781/html5/thumbnails/67.jpg)
Symfony @ OpenSky
• Two tiers of authentication implemented using role voters. • PartiallyAuthenticatedVoter
Security
![Page 68: Symfony Live San Francisco 2017 - Symfony @ OpenSky](https://reader031.vdocuments.net/reader031/viewer/2022021422/5a6479ef7f8b9a46568b4781/html5/thumbnails/68.jpg)
Symfony @ OpenSky
• Two tiers of authentication implemented using role voters. • PartiallyAuthenticatedVoter • AuthenticatedRecentlyVoter
Security
![Page 69: Symfony Live San Francisco 2017 - Symfony @ OpenSky](https://reader031.vdocuments.net/reader031/viewer/2022021422/5a6479ef7f8b9a46568b4781/html5/thumbnails/69.jpg)
Symfony @ OpenSky
• Two tiers of authentication implemented using role voters. • PartiallyAuthenticatedVoter • AuthenticatedRecentlyVoter
• When a user is recently authenticated, they are logged in to 2nd tier of authentication and have access to account, checkout, etc. After 15 minutes of inactivity, user is logged out of 2nd tier.
Security
![Page 70: Symfony Live San Francisco 2017 - Symfony @ OpenSky](https://reader031.vdocuments.net/reader031/viewer/2022021422/5a6479ef7f8b9a46568b4781/html5/thumbnails/70.jpg)
Symfony @ OpenSky
• Two tiers of authentication implemented using role voters. • PartiallyAuthenticatedVoter • AuthenticatedRecentlyVoter
• When a user is recently authenticated, they are logged in to 2nd tier of authentication and have access to account, checkout, etc. After 15 minutes of inactivity, user is logged out of 2nd tier.
• Admin integrates with LDAP (using zendframework/zend-ldap)
Security
![Page 71: Symfony Live San Francisco 2017 - Symfony @ OpenSky](https://reader031.vdocuments.net/reader031/viewer/2022021422/5a6479ef7f8b9a46568b4781/html5/thumbnails/71.jpg)
Symfony @ OpenSky
• Two tiers of authentication implemented using role voters. • PartiallyAuthenticatedVoter • AuthenticatedRecentlyVoter
• When a user is recently authenticated, they are logged in to 2nd tier of authentication and have access to account, checkout, etc. After 15 minutes of inactivity, user is logged out of 2nd tier.
• Admin integrates with LDAP (using zendframework/zend-ldap)
• Multiple firewalls/authentication providers for consumer facing, admin and api.
Security
![Page 72: Symfony Live San Francisco 2017 - Symfony @ OpenSky](https://reader031.vdocuments.net/reader031/viewer/2022021422/5a6479ef7f8b9a46568b4781/html5/thumbnails/72.jpg)
Symfony @ OpenSky
Runtime Settings/Parameters• Parameters defined in config/parameters.yml
![Page 73: Symfony Live San Francisco 2017 - Symfony @ OpenSky](https://reader031.vdocuments.net/reader031/viewer/2022021422/5a6479ef7f8b9a46568b4781/html5/thumbnails/73.jpg)
Symfony @ OpenSky
• Parameters defined in config/parameters.yml • Override stored in MongoDB
Runtime Settings/Parameters
![Page 74: Symfony Live San Francisco 2017 - Symfony @ OpenSky](https://reader031.vdocuments.net/reader031/viewer/2022021422/5a6479ef7f8b9a46568b4781/html5/thumbnails/74.jpg)
Symfony @ OpenSky
• Parameters defined in config/parameters.yml • Override stored in MongoDB • Parameters can have start & end datetime
Runtime Settings/Parameters
![Page 75: Symfony Live San Francisco 2017 - Symfony @ OpenSky](https://reader031.vdocuments.net/reader031/viewer/2022021422/5a6479ef7f8b9a46568b4781/html5/thumbnails/75.jpg)
Symfony @ OpenSky
• Parameters defined in config/parameters.yml • Override stored in MongoDB • Parameters can have start & end datetime • All parameters stored in cache
Runtime Settings/Parameters
![Page 76: Symfony Live San Francisco 2017 - Symfony @ OpenSky](https://reader031.vdocuments.net/reader031/viewer/2022021422/5a6479ef7f8b9a46568b4781/html5/thumbnails/76.jpg)
Symfony @ OpenSky
• Parameters defined in config/parameters.yml • Override stored in MongoDB • Parameters can have start & end datetime • All parameters stored in cache • When parameter value is changed, cache is
updated and queue workers restarted
Runtime Settings/Parameters
![Page 77: Symfony Live San Francisco 2017 - Symfony @ OpenSky](https://reader031.vdocuments.net/reader031/viewer/2022021422/5a6479ef7f8b9a46568b4781/html5/thumbnails/77.jpg)
Symfony @ OpenSky
• Parameters defined in config/parameters.yml • Override stored in MongoDB • Parameters can have start & end datetime • All parameters stored in cache • When parameter value is changed, cache is
updated and queue workers restarted • Allows for configuration changes without
deployment
Runtime Settings/Parameters
![Page 78: Symfony Live San Francisco 2017 - Symfony @ OpenSky](https://reader031.vdocuments.net/reader031/viewer/2022021422/5a6479ef7f8b9a46568b4781/html5/thumbnails/78.jpg)
Symfony @ OpenSky
• Parameters defined in config/parameters.yml • Override stored in MongoDB • Parameters can have start & end datetime • All parameters stored in cache • When parameter value is changed, cache is
updated and queue workers restarted • Allows for configuration changes without
deployment • Heavily used for feature flags and enable/
disable of new features
Runtime Settings/Parameters
![Page 79: Symfony Live San Francisco 2017 - Symfony @ OpenSky](https://reader031.vdocuments.net/reader031/viewer/2022021422/5a6479ef7f8b9a46568b4781/html5/thumbnails/79.jpg)
Symfony @ OpenSky
Runtime Settings/Parameters
![Page 80: Symfony Live San Francisco 2017 - Symfony @ OpenSky](https://reader031.vdocuments.net/reader031/viewer/2022021422/5a6479ef7f8b9a46568b4781/html5/thumbnails/80.jpg)
Symfony @ OpenSky
Runtime Settings/Parameters
![Page 81: Symfony Live San Francisco 2017 - Symfony @ OpenSky](https://reader031.vdocuments.net/reader031/viewer/2022021422/5a6479ef7f8b9a46568b4781/html5/thumbnails/81.jpg)
Symfony @ OpenSky
Runtime Settings/Parameters
![Page 82: Symfony Live San Francisco 2017 - Symfony @ OpenSky](https://reader031.vdocuments.net/reader031/viewer/2022021422/5a6479ef7f8b9a46568b4781/html5/thumbnails/82.jpg)
Symfony @ OpenSky
EVENTS
![Page 83: Symfony Live San Francisco 2017 - Symfony @ OpenSky](https://reader031.vdocuments.net/reader031/viewer/2022021422/5a6479ef7f8b9a46568b4781/html5/thumbnails/83.jpg)
Symfony @ OpenSky
• Perform tasks after the response has been sent to client
Event kernel.terminate
![Page 84: Symfony Live San Francisco 2017 - Symfony @ OpenSky](https://reader031.vdocuments.net/reader031/viewer/2022021422/5a6479ef7f8b9a46568b4781/html5/thumbnails/84.jpg)
Symfony @ OpenSky
• Perform tasks after the response has been sent to client • Store Request Log in MongoDB Collection
Event kernel.terminate
![Page 85: Symfony Live San Francisco 2017 - Symfony @ OpenSky](https://reader031.vdocuments.net/reader031/viewer/2022021422/5a6479ef7f8b9a46568b4781/html5/thumbnails/85.jpg)
Symfony @ OpenSky
• Perform tasks after the response has been sent to client • Store Request Log in MongoDB Collection • Analyze request for further actions
Event kernel.terminate
![Page 86: Symfony Live San Francisco 2017 - Symfony @ OpenSky](https://reader031.vdocuments.net/reader031/viewer/2022021422/5a6479ef7f8b9a46568b4781/html5/thumbnails/86.jpg)
Symfony @ OpenSky
• Perform tasks after the response has been sent to client • Store Request Log in MongoDB Collection • Analyze request for further actions
• Only effective with FastCGI
Event kernel.terminate
![Page 87: Symfony Live San Francisco 2017 - Symfony @ OpenSky](https://reader031.vdocuments.net/reader031/viewer/2022021422/5a6479ef7f8b9a46568b4781/html5/thumbnails/87.jpg)
Symfony @ OpenSky
• Queueing events for async functionality
Events system
![Page 88: Symfony Live San Francisco 2017 - Symfony @ OpenSky](https://reader031.vdocuments.net/reader031/viewer/2022021422/5a6479ef7f8b9a46568b4781/html5/thumbnails/88.jpg)
Symfony @ OpenSky
• Queueing events for async functionality • Event serializer/unserializer
Events system
![Page 89: Symfony Live San Francisco 2017 - Symfony @ OpenSky](https://reader031.vdocuments.net/reader031/viewer/2022021422/5a6479ef7f8b9a46568b4781/html5/thumbnails/89.jpg)
Symfony @ OpenSky
• Queueing events for async functionality • Event serializer/unserializer • Scheduling events
Events system
![Page 90: Symfony Live San Francisco 2017 - Symfony @ OpenSky](https://reader031.vdocuments.net/reader031/viewer/2022021422/5a6479ef7f8b9a46568b4781/html5/thumbnails/90.jpg)
Symfony @ OpenSky
• Queueing events for async functionality • Event serializer/unserializer • Scheduling events • Event retries, retry max amount
Events system
![Page 91: Symfony Live San Francisco 2017 - Symfony @ OpenSky](https://reader031.vdocuments.net/reader031/viewer/2022021422/5a6479ef7f8b9a46568b4781/html5/thumbnails/91.jpg)
Symfony @ OpenSky
• Queueing events for async functionality • Event serializer/unserializer • Scheduling events • Event retries, retry max amount • One queue per mongodb collection
Events system
![Page 92: Symfony Live San Francisco 2017 - Symfony @ OpenSky](https://reader031.vdocuments.net/reader031/viewer/2022021422/5a6479ef7f8b9a46568b4781/html5/thumbnails/92.jpg)
Symfony @ OpenSky
• Queueing events for async functionality • Event serializer/unserializer • Scheduling events • Event retries, retry max amount • One queue per mongodb collection • Queue workers managed with Supervisord
Events system
![Page 93: Symfony Live San Francisco 2017 - Symfony @ OpenSky](https://reader031.vdocuments.net/reader031/viewer/2022021422/5a6479ef7f8b9a46568b4781/html5/thumbnails/93.jpg)
Symfony @ OpenSky
Events system
![Page 94: Symfony Live San Francisco 2017 - Symfony @ OpenSky](https://reader031.vdocuments.net/reader031/viewer/2022021422/5a6479ef7f8b9a46568b4781/html5/thumbnails/94.jpg)
Symfony @ OpenSky
Events system
![Page 95: Symfony Live San Francisco 2017 - Symfony @ OpenSky](https://reader031.vdocuments.net/reader031/viewer/2022021422/5a6479ef7f8b9a46568b4781/html5/thumbnails/95.jpg)
Symfony @ OpenSky
Events system
![Page 96: Symfony Live San Francisco 2017 - Symfony @ OpenSky](https://reader031.vdocuments.net/reader031/viewer/2022021422/5a6479ef7f8b9a46568b4781/html5/thumbnails/96.jpg)
Symfony @ OpenSky
Events system
![Page 97: Symfony Live San Francisco 2017 - Symfony @ OpenSky](https://reader031.vdocuments.net/reader031/viewer/2022021422/5a6479ef7f8b9a46568b4781/html5/thumbnails/97.jpg)
Symfony @ OpenSky
Events system
![Page 98: Symfony Live San Francisco 2017 - Symfony @ OpenSky](https://reader031.vdocuments.net/reader031/viewer/2022021422/5a6479ef7f8b9a46568b4781/html5/thumbnails/98.jpg)
Symfony @ OpenSky
SLACK
![Page 99: Symfony Live San Francisco 2017 - Symfony @ OpenSky](https://reader031.vdocuments.net/reader031/viewer/2022021422/5a6479ef7f8b9a46568b4781/html5/thumbnails/99.jpg)
Symfony @ OpenSky
• php-kip using yabot
Slack integration
![Page 100: Symfony Live San Francisco 2017 - Symfony @ OpenSky](https://reader031.vdocuments.net/reader031/viewer/2022021422/5a6479ef7f8b9a46568b4781/html5/thumbnails/100.jpg)
Symfony @ OpenSky
• php-kip using yabot • Production deploy queue/line
Slack integration
![Page 101: Symfony Live San Francisco 2017 - Symfony @ OpenSky](https://reader031.vdocuments.net/reader031/viewer/2022021422/5a6479ef7f8b9a46568b4781/html5/thumbnails/101.jpg)
Symfony @ OpenSky
• php-kip using yabot • Production deploy queue/line • Dev environment reservations & deploys
Slack integration
![Page 102: Symfony Live San Francisco 2017 - Symfony @ OpenSky](https://reader031.vdocuments.net/reader031/viewer/2022021422/5a6479ef7f8b9a46568b4781/html5/thumbnails/102.jpg)
Symfony @ OpenSky
Symfony at OpenSkyPhp-kip using yubot
- Production deploy queue/line - Dev environment deploys
Slack integration
![Page 103: Symfony Live San Francisco 2017 - Symfony @ OpenSky](https://reader031.vdocuments.net/reader031/viewer/2022021422/5a6479ef7f8b9a46568b4781/html5/thumbnails/103.jpg)
Symfony @ OpenSky
Symfony at OpenSkyPhp-kip using yubot
- Production deploy queue/line - Dev environment deploys
Slack integration
![Page 104: Symfony Live San Francisco 2017 - Symfony @ OpenSky](https://reader031.vdocuments.net/reader031/viewer/2022021422/5a6479ef7f8b9a46568b4781/html5/thumbnails/104.jpg)
Symfony @ OpenSky
Symfony at OpenSkyPhp-kip using yubot
- Production deploy queue/line - Dev environment deploys
Slack integration
![Page 105: Symfony Live San Francisco 2017 - Symfony @ OpenSky](https://reader031.vdocuments.net/reader031/viewer/2022021422/5a6479ef7f8b9a46568b4781/html5/thumbnails/105.jpg)
Symfony @ OpenSky
Slack integration
![Page 106: Symfony Live San Francisco 2017 - Symfony @ OpenSky](https://reader031.vdocuments.net/reader031/viewer/2022021422/5a6479ef7f8b9a46568b4781/html5/thumbnails/106.jpg)
Symfony @ OpenSky
Slack integration
![Page 107: Symfony Live San Francisco 2017 - Symfony @ OpenSky](https://reader031.vdocuments.net/reader031/viewer/2022021422/5a6479ef7f8b9a46568b4781/html5/thumbnails/107.jpg)
Symfony @ OpenSky
Slack integration
![Page 108: Symfony Live San Francisco 2017 - Symfony @ OpenSky](https://reader031.vdocuments.net/reader031/viewer/2022021422/5a6479ef7f8b9a46568b4781/html5/thumbnails/108.jpg)
Symfony @ OpenSky
SEARCH
![Page 109: Symfony Live San Francisco 2017 - Symfony @ OpenSky](https://reader031.vdocuments.net/reader031/viewer/2022021422/5a6479ef7f8b9a46568b4781/html5/thumbnails/109.jpg)
Symfony @ OpenSky
Search
• Integration with Algolia
![Page 110: Symfony Live San Francisco 2017 - Symfony @ OpenSky](https://reader031.vdocuments.net/reader031/viewer/2022021422/5a6479ef7f8b9a46568b4781/html5/thumbnails/110.jpg)
Symfony @ OpenSky
• Integration with Algolia • algolia/algoliasearch-client-php
Search
![Page 111: Symfony Live San Francisco 2017 - Symfony @ OpenSky](https://reader031.vdocuments.net/reader031/viewer/2022021422/5a6479ef7f8b9a46568b4781/html5/thumbnails/111.jpg)
Symfony @ OpenSky
• Integration with Algolia • algolia/algoliasearch-client-php • Update index through async Event
Listeners
Search
![Page 112: Symfony Live San Francisco 2017 - Symfony @ OpenSky](https://reader031.vdocuments.net/reader031/viewer/2022021422/5a6479ef7f8b9a46568b4781/html5/thumbnails/112.jpg)
Symfony @ OpenSky
Payments• Integration with Braintree Payments • braintree/braintree_php
![Page 113: Symfony Live San Francisco 2017 - Symfony @ OpenSky](https://reader031.vdocuments.net/reader031/viewer/2022021422/5a6479ef7f8b9a46568b4781/html5/thumbnails/113.jpg)
Symfony @ OpenSky
• NPM • jQuery • RequireJS • Backbone • TwigJS • Gulp / Less / Sass
The Frontend
![Page 114: Symfony Live San Francisco 2017 - Symfony @ OpenSky](https://reader031.vdocuments.net/reader031/viewer/2022021422/5a6479ef7f8b9a46568b4781/html5/thumbnails/114.jpg)
Symfony @ OpenSky
• A/B Split Testing using Optimizely for testing UI/UX changes
• Send small % of traffic to new features • GoogleAnalytics tracking conversion rate
The Frontend
![Page 115: Symfony Live San Francisco 2017 - Symfony @ OpenSky](https://reader031.vdocuments.net/reader031/viewer/2022021422/5a6479ef7f8b9a46568b4781/html5/thumbnails/115.jpg)
Symfony @ OpenSky
TESTING
![Page 116: Symfony Live San Francisco 2017 - Symfony @ OpenSky](https://reader031.vdocuments.net/reader031/viewer/2022021422/5a6479ef7f8b9a46568b4781/html5/thumbnails/116.jpg)
Symfony @ OpenSky
• pr-nightmareTesting
![Page 117: Symfony Live San Francisco 2017 - Symfony @ OpenSky](https://reader031.vdocuments.net/reader031/viewer/2022021422/5a6479ef7f8b9a46568b4781/html5/thumbnails/117.jpg)
Symfony @ OpenSky
• pr-nightmare • Runs on all commits and pull requests
Testing
![Page 118: Symfony Live San Francisco 2017 - Symfony @ OpenSky](https://reader031.vdocuments.net/reader031/viewer/2022021422/5a6479ef7f8b9a46568b4781/html5/thumbnails/118.jpg)
Symfony @ OpenSky
• pr-nightmare • Runs on all commits and pull requests • Uses PHPChunkit to run 30 minutes of tests in 3
minutes by running groups of tests in parallel across multiple servers. https://github.com/jwage/phpchunkit
Testing
![Page 119: Symfony Live San Francisco 2017 - Symfony @ OpenSky](https://reader031.vdocuments.net/reader031/viewer/2022021422/5a6479ef7f8b9a46568b4781/html5/thumbnails/119.jpg)
Symfony @ OpenSky
• pr-nightmare • Runs on all commits and pull requests • Uses PHPChunkit to run 30 minutes of tests in 3
minutes by running groups of tests in parallel across multiple servers. https://github.com/jwage/phpchunkit
• Selenium for browser functional testing
Testing
![Page 120: Symfony Live San Francisco 2017 - Symfony @ OpenSky](https://reader031.vdocuments.net/reader031/viewer/2022021422/5a6479ef7f8b9a46568b4781/html5/thumbnails/120.jpg)
Symfony @ OpenSky
Testing
![Page 121: Symfony Live San Francisco 2017 - Symfony @ OpenSky](https://reader031.vdocuments.net/reader031/viewer/2022021422/5a6479ef7f8b9a46568b4781/html5/thumbnails/121.jpg)
Symfony @ OpenSky
• ‘@app admin’ annotation to indicate web test cases which app/kernel to boot up
Testing with PHPUnit
![Page 122: Symfony Live San Francisco 2017 - Symfony @ OpenSky](https://reader031.vdocuments.net/reader031/viewer/2022021422/5a6479ef7f8b9a46568b4781/html5/thumbnails/122.jpg)
Symfony @ OpenSky
• ‘@app admin’ annotation to indicate web test cases which app/kernel to boot up
• AutoDataCleanupListener keeps tracks of what collections and tables were inserted to in a test and cleans up afterwards. This used to be explicitly required by the developer but happens automatically now
Testing with PHPUnit
![Page 123: Symfony Live San Francisco 2017 - Symfony @ OpenSky](https://reader031.vdocuments.net/reader031/viewer/2022021422/5a6479ef7f8b9a46568b4781/html5/thumbnails/123.jpg)
Symfony @ OpenSky
• ‘@app admin’ annotation to indicate web test cases which app/kernel to boot up
• AutoDataCleanupListener keeps tracks of what collections and tables were inserted to in a test and cleans up afterwards. This used to be explicitly required by the developer but happens automatically now
• AbstractTwigLintTest: Twig linting. Loads up all twig files to make sure there are no parse errors
Testing with PHPUnit
![Page 124: Symfony Live San Francisco 2017 - Symfony @ OpenSky](https://reader031.vdocuments.net/reader031/viewer/2022021422/5a6479ef7f8b9a46568b4781/html5/thumbnails/124.jpg)
Symfony @ OpenSky
• ‘@app admin’ annotation to indicate web test cases which app/kernel to boot up
• AutoDataCleanupListener keeps tracks of what collections and tables were inserted to in a test and cleans up afterwards. This used to be explicitly required by the developer but happens automatically now
• AbstractTwigLintTest: Twig linting. Loads up all twig files to make sure there are no parse errors
• Generating unit tests from class definitions
Testing with PHPUnit
![Page 125: Symfony Live San Francisco 2017 - Symfony @ OpenSky](https://reader031.vdocuments.net/reader031/viewer/2022021422/5a6479ef7f8b9a46568b4781/html5/thumbnails/125.jpg)
Symfony @ OpenSky
• ‘@app admin’ annotation to indicate web test cases which app/kernel to boot up
• AutoDataCleanupListener keeps tracks of what collections and tables were inserted to in a test and cleans up afterwards. This used to be explicitly required by the developer but happens automatically now
• AbstractTwigLintTest: Twig linting. Loads up all twig files to make sure there are no parse errors
• Generating unit tests from class definitions • PHPUnit watch command
Testing with PHPUnit
![Page 126: Symfony Live San Francisco 2017 - Symfony @ OpenSky](https://reader031.vdocuments.net/reader031/viewer/2022021422/5a6479ef7f8b9a46568b4781/html5/thumbnails/126.jpg)
Symfony @ OpenSky
Testing with PHPUnit
![Page 127: Symfony Live San Francisco 2017 - Symfony @ OpenSky](https://reader031.vdocuments.net/reader031/viewer/2022021422/5a6479ef7f8b9a46568b4781/html5/thumbnails/127.jpg)
Symfony @ OpenSky
Testing with PHPUnit
![Page 128: Symfony Live San Francisco 2017 - Symfony @ OpenSky](https://reader031.vdocuments.net/reader031/viewer/2022021422/5a6479ef7f8b9a46568b4781/html5/thumbnails/128.jpg)
Symfony @ OpenSky
PHPUnit watch
![Page 129: Symfony Live San Francisco 2017 - Symfony @ OpenSky](https://reader031.vdocuments.net/reader031/viewer/2022021422/5a6479ef7f8b9a46568b4781/html5/thumbnails/129.jpg)
Symfony @ OpenSky
PHPUnit watch
![Page 130: Symfony Live San Francisco 2017 - Symfony @ OpenSky](https://reader031.vdocuments.net/reader031/viewer/2022021422/5a6479ef7f8b9a46568b4781/html5/thumbnails/130.jpg)
Symfony @ OpenSky
PHPUnit watch
![Page 131: Symfony Live San Francisco 2017 - Symfony @ OpenSky](https://reader031.vdocuments.net/reader031/viewer/2022021422/5a6479ef7f8b9a46568b4781/html5/thumbnails/131.jpg)
Symfony @ OpenSky
PHPUnit watch
![Page 132: Symfony Live San Francisco 2017 - Symfony @ OpenSky](https://reader031.vdocuments.net/reader031/viewer/2022021422/5a6479ef7f8b9a46568b4781/html5/thumbnails/132.jpg)
Symfony @ OpenSky
Twig Lint with PHPUnit
![Page 133: Symfony Live San Francisco 2017 - Symfony @ OpenSky](https://reader031.vdocuments.net/reader031/viewer/2022021422/5a6479ef7f8b9a46568b4781/html5/thumbnails/133.jpg)
Symfony @ OpenSky
Twig Lint with PHPUnit
![Page 134: Symfony Live San Francisco 2017 - Symfony @ OpenSky](https://reader031.vdocuments.net/reader031/viewer/2022021422/5a6479ef7f8b9a46568b4781/html5/thumbnails/134.jpg)
Symfony @ OpenSky
Twig Lint with PHPUnit
![Page 135: Symfony Live San Francisco 2017 - Symfony @ OpenSky](https://reader031.vdocuments.net/reader031/viewer/2022021422/5a6479ef7f8b9a46568b4781/html5/thumbnails/135.jpg)
Symfony @ OpenSky
DEPLOYMENT
![Page 136: Symfony Live San Francisco 2017 - Symfony @ OpenSky](https://reader031.vdocuments.net/reader031/viewer/2022021422/5a6479ef7f8b9a46568b4781/html5/thumbnails/136.jpg)
Symfony @ OpenSky
Deployment• Use Customized Fabric • Manually started from Jenkins • First build task
• Merge feature/fix branch into master
• Create Tag
![Page 137: Symfony Live San Francisco 2017 - Symfony @ OpenSky](https://reader031.vdocuments.net/reader031/viewer/2022021422/5a6479ef7f8b9a46568b4781/html5/thumbnails/137.jpg)
Symfony @ OpenSky
• Final build task • git checkout • composer install --no-dev —no-scripts • Build front controller • Run gulp, requires, less, sass • Warmup cache for each app • Assetic dump • Build artifacts file & distribute it to
servers • Run MySQL & MongoDB Migrations • Rotate logs • Restart php-fpm • Reload Varnish and nginx • Restart queue workers
Deployment• Use Customized Fabric • Manually started from Jenkins • First build task
• Merge feature/fix branch into master
• Create Tag
![Page 138: Symfony Live San Francisco 2017 - Symfony @ OpenSky](https://reader031.vdocuments.net/reader031/viewer/2022021422/5a6479ef7f8b9a46568b4781/html5/thumbnails/138.jpg)
Symfony @ OpenSky
Questions?
![Page 139: Symfony Live San Francisco 2017 - Symfony @ OpenSky](https://reader031.vdocuments.net/reader031/viewer/2022021422/5a6479ef7f8b9a46568b4781/html5/thumbnails/139.jpg)
Symfony @ OpenSky
Thank you!Pablo Godel
@pgodel
http://slideshare.net/pgodel https://joind.in/talk/bfd1e