SlideShare ist ein Scribd-Unternehmen logo
1 von 31
Downloaden Sie, um offline zu lesen
Effectively Reuse the Code
Between PHP Projects
www.oroinc.com
Andrey Yatsenko
Passionate about Symfony & DX
- Trainer
- Developer
- Community Evangelist
7 offices in 5 Countries
(USA , Germany, France, Ukraine, Poland)
Global Partner Network
Open-source applications
About Oro Inc.
www.oroinc.com
Oro Applications
11 Applications
● commerce
● commerce-crm
● commerce-crm-de
● commerce-crm-ee
● commerce-crm-ee-de
● commerce-demo
● commerce-enterprise
● crm
● crm-demo
● crm-enterprise
● platform
How to share code between applications?
#1 Copy & Paste
● Easy to do
● Hard to maintain the changes
End up with many versions
of the same package
#2 Don’t reinvent the wheel
Reuse as much as you can!
#2 Don’t reinvent the wheel
At ORO we don't.
● 190+ production dependencies
● 760+ dev & testing dependencies
#3 Many Repositories
● Every reusable package is a separate GIT repository
● Application repositories require package repositories
What to extract to the package?
We can declare every Symfony bundle as a new package.
What to extract to the package?
We can declare every Symfony bundle as a new package.
At ORO we have 170 + unique bundles
What to extract to the package?
Recommendations:
1. A single package has many related bundles
2. Start from big packages and extract when needed
3. Same root namespace for all the packages
Oro Applications
11 Applications
● commerce
● commerce-crm
● commerce-crm-de
● commerce-crm-ee
● commerce-crm-ee-de
● commerce-demo
● commerce-enterprise
● crm
● crm-demo
● crm-enterprise
● platform
37 Reusable Packages Contain 170+ Bundles
● apruve
● authorizenet
● calendar
● call
● commerce
● commerce-crm
● commerce-crm-ee
● commerce-demo
● commerce-enterprise
● crm
● crm-demo
● crm-enterprise
● customer-portal
● demo-data
● dotmailer
● dpd
● ews
● german-localization
● google-hangout
● healthcheck
● infinitepay
● ldap
● magento-contact-us
● marketing
● oauth2-server
● outlook
● paypal-express
● platform
● platform-enterprise
● redis-config
● serialized-fields
● task
● test-security
● twig-inspector
● view-switcher
● wirecard
● zendesk
How to attach packages to an application?
# 3.1 Git Submodules
● Easy to start
● Hard to manage the code changes for a single task
# 3.2 Composer Packages
Each repo has its own composer.json
● Publish at Packagist.org
● Publish privately in Packagist.com or Satis
● Do not publish, but attach it as VCS repository
Pros:
● Versioning
● Simplified dependency management
Cons:
● Publishing is overhead
● Hard to manage the code changes for a single task
# 3.2 Composer Packages
What about storing all the projects in a single repo?
What about storing all the projects in a single repo?
And delivering/deploying only what we need to.
#4 Monorepo
● All packages and applications are in a single repository
● Packages are not tight to a single technology
● Git Subtree allows to publish many repos from monorepo
#4 Monorepo
Pros:
● Easy to do cross package changes
Cons:
● Repository size
#4 Monorepo
Famous monorepos:
#4 Monorepo at ORO
11 Applications
● commerce
● commerce-crm
● commerce-crm-de
● commerce-crm-ee
● commerce-crm-ee-de
● commerce-demo
● commerce-enterprise
● crm
● crm-demo
● crm-enterprise
● platform
37 Reusable Packages Contain 170+ Bundles
● apruve
● authorizenet
● calendar
● call
● commerce
● commerce-crm
● commerce-crm-ee
● commerce-demo
● commerce-enterprise
● crm
● crm-demo
● crm-enterprise
● customer-portal
● demo-data
● dotmailer
● dpd
● ews
● german-localization
● google-hangout
● healthcheck
● infinitepay
● ldap
● magento-contact-us
● marketing
● oauth2-server
● outlook
● paypal-express
● platform
● platform-enterprise
● redis-config
● serialized-fields
● task
● test-security
● twig-inspector
● view-switcher
● wirecard
● zendesk
Do all tools work with a monorepo?
PHPStorm & Monorepo
● Excluded folders
● Custom CLI command to switch active application in a monorepo
PHPStorm & Monorepo
Git Subtree & Monorepo
Automated split of the monorepo to many repositories
Pros:
● Saved history
● Supports two way sync
● Easy to add new repository
Cons:
● Requires CI integration
GitHub Code Owners & Monorepo
Define who is responsible for the code in .github/CODEOWNERS
Summary
No silver bullet
Solutions:
1. Copy & Paste
2. Don't write the code
3. Many repos
3.1. Git Submodules
3.2. Composer Packages
■ Public
■ Private
■ Unpublished
4. Monorepo
Thank you!

Weitere ähnliche Inhalte

Was ist angesagt?

Under the Hood of a Shard-per-Core Database Architecture
Under the Hood of a Shard-per-Core Database ArchitectureUnder the Hood of a Shard-per-Core Database Architecture
Under the Hood of a Shard-per-Core Database ArchitectureScyllaDB
 
Project meeting: Android Graphics Architecture Overview
Project meeting: Android Graphics Architecture OverviewProject meeting: Android Graphics Architecture Overview
Project meeting: Android Graphics Architecture OverviewYu-Hsin Hung
 
XPDS13: Xen in OSS based In–Vehicle Infotainment Systems - Artem Mygaiev, Glo...
XPDS13: Xen in OSS based In–Vehicle Infotainment Systems - Artem Mygaiev, Glo...XPDS13: Xen in OSS based In–Vehicle Infotainment Systems - Artem Mygaiev, Glo...
XPDS13: Xen in OSS based In–Vehicle Infotainment Systems - Artem Mygaiev, Glo...The Linux Foundation
 
MySQL Parallel Replication by Booking.com
MySQL Parallel Replication by Booking.comMySQL Parallel Replication by Booking.com
MySQL Parallel Replication by Booking.comJean-François Gagné
 
Laravel Load Testing: Strategies and Tools
Laravel Load Testing: Strategies and ToolsLaravel Load Testing: Strategies and Tools
Laravel Load Testing: Strategies and ToolsMuhammad Shehata
 
RedisConf17 - Roblox - How Roblox Keeps Millions of Users Up to Date with Red...
RedisConf17 - Roblox - How Roblox Keeps Millions of Users Up to Date with Red...RedisConf17 - Roblox - How Roblox Keeps Millions of Users Up to Date with Red...
RedisConf17 - Roblox - How Roblox Keeps Millions of Users Up to Date with Red...Redis Labs
 
Tuning the Kernel for Varnish Cache
Tuning the Kernel for Varnish CacheTuning the Kernel for Varnish Cache
Tuning the Kernel for Varnish CachePer Buer
 
Linux internal
Linux internalLinux internal
Linux internalmcganesh
 
Demystify eBPF JIT Compiler
Demystify eBPF JIT CompilerDemystify eBPF JIT Compiler
Demystify eBPF JIT CompilerNetronome
 
BIND 9 logging best practices
BIND 9 logging best practicesBIND 9 logging best practices
BIND 9 logging best practicesMen and Mice
 
Deep Dive into MySQL InnoDB Cluster Read Scale-out Capabilities.pdf
Deep Dive into MySQL InnoDB Cluster Read Scale-out Capabilities.pdfDeep Dive into MySQL InnoDB Cluster Read Scale-out Capabilities.pdf
Deep Dive into MySQL InnoDB Cluster Read Scale-out Capabilities.pdfMiguel Araújo
 
Attacking Windows NDIS Drivers
Attacking Windows NDIS DriversAttacking Windows NDIS Drivers
Attacking Windows NDIS DriversKique Nissim
 
CICS Transaction Gateway V9.1 Overview
CICS Transaction Gateway V9.1 OverviewCICS Transaction Gateway V9.1 Overview
CICS Transaction Gateway V9.1 OverviewRobert Jones
 
Learning RSocket Using RSC
Learning RSocket Using RSCLearning RSocket Using RSC
Learning RSocket Using RSCVMware Tanzu
 
LAS16-200: SCMI - System Management and Control Interface
LAS16-200:  SCMI - System Management and Control InterfaceLAS16-200:  SCMI - System Management and Control Interface
LAS16-200: SCMI - System Management and Control InterfaceLinaro
 
Kernel advantages for Istio realized with Cilium
Kernel advantages for Istio realized with CiliumKernel advantages for Istio realized with Cilium
Kernel advantages for Istio realized with CiliumCynthia Thomas
 
Building your own embedded system with Yocto
Building your own embedded system with YoctoBuilding your own embedded system with Yocto
Building your own embedded system with Yoctommeisenzahl
 
Efficient Pagination Using MySQL
Efficient Pagination Using MySQLEfficient Pagination Using MySQL
Efficient Pagination Using MySQLEvan Weaver
 
Building Large Java Projects Faster: Multicore javac and Makefile integration
Building Large Java Projects Faster: Multicore javac and Makefile integrationBuilding Large Java Projects Faster: Multicore javac and Makefile integration
Building Large Java Projects Faster: Multicore javac and Makefile integrationFredrik Öhrström
 

Was ist angesagt? (20)

Under the Hood of a Shard-per-Core Database Architecture
Under the Hood of a Shard-per-Core Database ArchitectureUnder the Hood of a Shard-per-Core Database Architecture
Under the Hood of a Shard-per-Core Database Architecture
 
Project meeting: Android Graphics Architecture Overview
Project meeting: Android Graphics Architecture OverviewProject meeting: Android Graphics Architecture Overview
Project meeting: Android Graphics Architecture Overview
 
XPDS13: Xen in OSS based In–Vehicle Infotainment Systems - Artem Mygaiev, Glo...
XPDS13: Xen in OSS based In–Vehicle Infotainment Systems - Artem Mygaiev, Glo...XPDS13: Xen in OSS based In–Vehicle Infotainment Systems - Artem Mygaiev, Glo...
XPDS13: Xen in OSS based In–Vehicle Infotainment Systems - Artem Mygaiev, Glo...
 
MySQL Parallel Replication by Booking.com
MySQL Parallel Replication by Booking.comMySQL Parallel Replication by Booking.com
MySQL Parallel Replication by Booking.com
 
Laravel Load Testing: Strategies and Tools
Laravel Load Testing: Strategies and ToolsLaravel Load Testing: Strategies and Tools
Laravel Load Testing: Strategies and Tools
 
RedisConf17 - Roblox - How Roblox Keeps Millions of Users Up to Date with Red...
RedisConf17 - Roblox - How Roblox Keeps Millions of Users Up to Date with Red...RedisConf17 - Roblox - How Roblox Keeps Millions of Users Up to Date with Red...
RedisConf17 - Roblox - How Roblox Keeps Millions of Users Up to Date with Red...
 
Tuning the Kernel for Varnish Cache
Tuning the Kernel for Varnish CacheTuning the Kernel for Varnish Cache
Tuning the Kernel for Varnish Cache
 
Linux internal
Linux internalLinux internal
Linux internal
 
Demystify eBPF JIT Compiler
Demystify eBPF JIT CompilerDemystify eBPF JIT Compiler
Demystify eBPF JIT Compiler
 
BIND 9 logging best practices
BIND 9 logging best practicesBIND 9 logging best practices
BIND 9 logging best practices
 
Deep Dive into MySQL InnoDB Cluster Read Scale-out Capabilities.pdf
Deep Dive into MySQL InnoDB Cluster Read Scale-out Capabilities.pdfDeep Dive into MySQL InnoDB Cluster Read Scale-out Capabilities.pdf
Deep Dive into MySQL InnoDB Cluster Read Scale-out Capabilities.pdf
 
Attacking Windows NDIS Drivers
Attacking Windows NDIS DriversAttacking Windows NDIS Drivers
Attacking Windows NDIS Drivers
 
CICS Transaction Gateway V9.1 Overview
CICS Transaction Gateway V9.1 OverviewCICS Transaction Gateway V9.1 Overview
CICS Transaction Gateway V9.1 Overview
 
Learning RSocket Using RSC
Learning RSocket Using RSCLearning RSocket Using RSC
Learning RSocket Using RSC
 
LAS16-200: SCMI - System Management and Control Interface
LAS16-200:  SCMI - System Management and Control InterfaceLAS16-200:  SCMI - System Management and Control Interface
LAS16-200: SCMI - System Management and Control Interface
 
Kernel advantages for Istio realized with Cilium
Kernel advantages for Istio realized with CiliumKernel advantages for Istio realized with Cilium
Kernel advantages for Istio realized with Cilium
 
Web services in ax 2012
Web services in ax 2012Web services in ax 2012
Web services in ax 2012
 
Building your own embedded system with Yocto
Building your own embedded system with YoctoBuilding your own embedded system with Yocto
Building your own embedded system with Yocto
 
Efficient Pagination Using MySQL
Efficient Pagination Using MySQLEfficient Pagination Using MySQL
Efficient Pagination Using MySQL
 
Building Large Java Projects Faster: Multicore javac and Makefile integration
Building Large Java Projects Faster: Multicore javac and Makefile integrationBuilding Large Java Projects Faster: Multicore javac and Makefile integration
Building Large Java Projects Faster: Multicore javac and Makefile integration
 

Ähnlich wie Effectively Reuse the Code Between PHP Projects

Build and deploy scientific Python Applications
Build and deploy scientific Python Applications  Build and deploy scientific Python Applications
Build and deploy scientific Python Applications Ramakrishna Reddy
 
Creating Large Scale Software Platforms with OSGi and an Extension Point Mode...
Creating Large Scale Software Platforms with OSGi and an Extension Point Mode...Creating Large Scale Software Platforms with OSGi and an Extension Point Mode...
Creating Large Scale Software Platforms with OSGi and an Extension Point Mode...Nuxeo
 
Docker and DevOps - Why it matters
Docker and DevOps - Why it mattersDocker and DevOps - Why it matters
Docker and DevOps - Why it mattersJeremy Brown
 
Leveraging Android's Linux Heritage
Leveraging Android's Linux HeritageLeveraging Android's Linux Heritage
Leveraging Android's Linux HeritageOpersys inc.
 
Beginning with Composer - Dependency manager in php
Beginning with Composer  - Dependency manager in php Beginning with Composer  - Dependency manager in php
Beginning with Composer - Dependency manager in php Yogesh Salvi
 
Why you should use native packages to install PostgreSQL on Linux
Why you should use native packages to install PostgreSQL on LinuxWhy you should use native packages to install PostgreSQL on Linux
Why you should use native packages to install PostgreSQL on LinuxEDB
 
Applying the Unix Philosophy to Django projects: a report from the real world
Applying the Unix Philosophy to Django projects: a report from the real worldApplying the Unix Philosophy to Django projects: a report from the real world
Applying the Unix Philosophy to Django projects: a report from the real worldFederico Capoano
 
Leveraging Android's Linux Heritage at ELC-E 2011
Leveraging Android's Linux Heritage at ELC-E 2011Leveraging Android's Linux Heritage at ELC-E 2011
Leveraging Android's Linux Heritage at ELC-E 2011Opersys inc.
 
Teaching Open Source In The University
Teaching Open Source In The UniversityTeaching Open Source In The University
Teaching Open Source In The UniversityDominique Cimafranca
 
UKLUG 2012 - XPages Extensibility API - going deep!
UKLUG 2012 - XPages Extensibility API - going deep!UKLUG 2012 - XPages Extensibility API - going deep!
UKLUG 2012 - XPages Extensibility API - going deep!René Winkelmeyer
 
Voxxed days Vilnius 2015 - Android Reverse Engineering Lab
Voxxed days Vilnius 2015 - Android Reverse Engineering LabVoxxed days Vilnius 2015 - Android Reverse Engineering Lab
Voxxed days Vilnius 2015 - Android Reverse Engineering LabRon Munitz
 
Leveraging Android's Linux Heritage at AnDevCon3
Leveraging Android's Linux Heritage at AnDevCon3Leveraging Android's Linux Heritage at AnDevCon3
Leveraging Android's Linux Heritage at AnDevCon3Opersys inc.
 
Docker for Developers.pdf
Docker for Developers.pdfDocker for Developers.pdf
Docker for Developers.pdfPyariKumaran
 
Nh php may 2014 - composer
Nh php   may 2014 - composerNh php   may 2014 - composer
Nh php may 2014 - composerDavid Weingart
 
Deploy and Update Jakarta EE & MicroProfile applications with Paketo.pptx
Deploy and Update Jakarta EE & MicroProfile applications with Paketo.pptxDeploy and Update Jakarta EE & MicroProfile applications with Paketo.pptx
Deploy and Update Jakarta EE & MicroProfile applications with Paketo.pptxJamie Coleman
 
Fandogh Cloud workshop slides
Fandogh Cloud workshop slides Fandogh Cloud workshop slides
Fandogh Cloud workshop slides ssarabadani
 
Workshop For pycon13
Workshop For pycon13Workshop For pycon13
Workshop For pycon13Steven Pousty
 

Ähnlich wie Effectively Reuse the Code Between PHP Projects (20)

Build and deploy scientific Python Applications
Build and deploy scientific Python Applications  Build and deploy scientific Python Applications
Build and deploy scientific Python Applications
 
Creating Large Scale Software Platforms with OSGi and an Extension Point Mode...
Creating Large Scale Software Platforms with OSGi and an Extension Point Mode...Creating Large Scale Software Platforms with OSGi and an Extension Point Mode...
Creating Large Scale Software Platforms with OSGi and an Extension Point Mode...
 
Docker and DevOps - Why it matters
Docker and DevOps - Why it mattersDocker and DevOps - Why it matters
Docker and DevOps - Why it matters
 
Leveraging Android's Linux Heritage
Leveraging Android's Linux HeritageLeveraging Android's Linux Heritage
Leveraging Android's Linux Heritage
 
Beginning with Composer - Dependency manager in php
Beginning with Composer  - Dependency manager in php Beginning with Composer  - Dependency manager in php
Beginning with Composer - Dependency manager in php
 
Why you should use native packages to install PostgreSQL on Linux
Why you should use native packages to install PostgreSQL on LinuxWhy you should use native packages to install PostgreSQL on Linux
Why you should use native packages to install PostgreSQL on Linux
 
Modularity problems
Modularity  problemsModularity  problems
Modularity problems
 
Applying the Unix Philosophy to Django projects: a report from the real world
Applying the Unix Philosophy to Django projects: a report from the real worldApplying the Unix Philosophy to Django projects: a report from the real world
Applying the Unix Philosophy to Django projects: a report from the real world
 
Make the most of twig
Make the most of twigMake the most of twig
Make the most of twig
 
Leveraging Android's Linux Heritage at ELC-E 2011
Leveraging Android's Linux Heritage at ELC-E 2011Leveraging Android's Linux Heritage at ELC-E 2011
Leveraging Android's Linux Heritage at ELC-E 2011
 
Teaching Open Source In The University
Teaching Open Source In The UniversityTeaching Open Source In The University
Teaching Open Source In The University
 
UKLUG 2012 - XPages Extensibility API - going deep!
UKLUG 2012 - XPages Extensibility API - going deep!UKLUG 2012 - XPages Extensibility API - going deep!
UKLUG 2012 - XPages Extensibility API - going deep!
 
Voxxed days Vilnius 2015 - Android Reverse Engineering Lab
Voxxed days Vilnius 2015 - Android Reverse Engineering LabVoxxed days Vilnius 2015 - Android Reverse Engineering Lab
Voxxed days Vilnius 2015 - Android Reverse Engineering Lab
 
Leveraging Android's Linux Heritage at AnDevCon3
Leveraging Android's Linux Heritage at AnDevCon3Leveraging Android's Linux Heritage at AnDevCon3
Leveraging Android's Linux Heritage at AnDevCon3
 
Docker for Developers.pdf
Docker for Developers.pdfDocker for Developers.pdf
Docker for Developers.pdf
 
Nh php may 2014 - composer
Nh php   may 2014 - composerNh php   may 2014 - composer
Nh php may 2014 - composer
 
Itb2018 thinking modularly
Itb2018   thinking modularlyItb2018   thinking modularly
Itb2018 thinking modularly
 
Deploy and Update Jakarta EE & MicroProfile applications with Paketo.pptx
Deploy and Update Jakarta EE & MicroProfile applications with Paketo.pptxDeploy and Update Jakarta EE & MicroProfile applications with Paketo.pptx
Deploy and Update Jakarta EE & MicroProfile applications with Paketo.pptx
 
Fandogh Cloud workshop slides
Fandogh Cloud workshop slides Fandogh Cloud workshop slides
Fandogh Cloud workshop slides
 
Workshop For pycon13
Workshop For pycon13Workshop For pycon13
Workshop For pycon13
 

Mehr von Andrew Yatsenko

Code Quality Control in a PHP project. GeekTalks, Cherkassy 2020
Code Quality Control in a PHP project. GeekTalks, Cherkassy 2020Code Quality Control in a PHP project. GeekTalks, Cherkassy 2020
Code Quality Control in a PHP project. GeekTalks, Cherkassy 2020Andrew Yatsenko
 
OroCommerce Storefront Design. Non-standard Layout Customisation.
OroCommerce Storefront Design. Non-standard Layout Customisation.OroCommerce Storefront Design. Non-standard Layout Customisation.
OroCommerce Storefront Design. Non-standard Layout Customisation.Andrew Yatsenko
 
Gear Up for OroPlatform 4.1 LTS. Dependency Injection Improvements Overview ...
Gear Up for OroPlatform 4.1 LTS.  Dependency Injection Improvements Overview ...Gear Up for OroPlatform 4.1 LTS.  Dependency Injection Improvements Overview ...
Gear Up for OroPlatform 4.1 LTS. Dependency Injection Improvements Overview ...Andrew Yatsenko
 
Performance profiling and testing of symfony application 2
Performance profiling and testing of symfony application 2Performance profiling and testing of symfony application 2
Performance profiling and testing of symfony application 2Andrew Yatsenko
 
Data cache management in php
Data cache management in phpData cache management in php
Data cache management in phpAndrew Yatsenko
 
Doctrine Internals. UnitOfWork
Doctrine Internals. UnitOfWorkDoctrine Internals. UnitOfWork
Doctrine Internals. UnitOfWorkAndrew Yatsenko
 
Writing extensible applications
Writing extensible applicationsWriting extensible applications
Writing extensible applicationsAndrew Yatsenko
 
Symfony Form Basics - OroMeetup #3 Cherkassy
Symfony Form Basics - OroMeetup #3 CherkassySymfony Form Basics - OroMeetup #3 Cherkassy
Symfony Form Basics - OroMeetup #3 CherkassyAndrew Yatsenko
 

Mehr von Andrew Yatsenko (9)

Code Quality Control in a PHP project. GeekTalks, Cherkassy 2020
Code Quality Control in a PHP project. GeekTalks, Cherkassy 2020Code Quality Control in a PHP project. GeekTalks, Cherkassy 2020
Code Quality Control in a PHP project. GeekTalks, Cherkassy 2020
 
OroCommerce Storefront Design. Non-standard Layout Customisation.
OroCommerce Storefront Design. Non-standard Layout Customisation.OroCommerce Storefront Design. Non-standard Layout Customisation.
OroCommerce Storefront Design. Non-standard Layout Customisation.
 
Gear Up for OroPlatform 4.1 LTS. Dependency Injection Improvements Overview ...
Gear Up for OroPlatform 4.1 LTS.  Dependency Injection Improvements Overview ...Gear Up for OroPlatform 4.1 LTS.  Dependency Injection Improvements Overview ...
Gear Up for OroPlatform 4.1 LTS. Dependency Injection Improvements Overview ...
 
Performance profiling and testing of symfony application 2
Performance profiling and testing of symfony application 2Performance profiling and testing of symfony application 2
Performance profiling and testing of symfony application 2
 
Using Oro layouts
Using Oro layoutsUsing Oro layouts
Using Oro layouts
 
Data cache management in php
Data cache management in phpData cache management in php
Data cache management in php
 
Doctrine Internals. UnitOfWork
Doctrine Internals. UnitOfWorkDoctrine Internals. UnitOfWork
Doctrine Internals. UnitOfWork
 
Writing extensible applications
Writing extensible applicationsWriting extensible applications
Writing extensible applications
 
Symfony Form Basics - OroMeetup #3 Cherkassy
Symfony Form Basics - OroMeetup #3 CherkassySymfony Form Basics - OroMeetup #3 Cherkassy
Symfony Form Basics - OroMeetup #3 Cherkassy
 

Kürzlich hochgeladen

The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...ranjana rawat
 
Booking open Available Pune Call Girls Pargaon 6297143586 Call Hot Indian Gi...
Booking open Available Pune Call Girls Pargaon  6297143586 Call Hot Indian Gi...Booking open Available Pune Call Girls Pargaon  6297143586 Call Hot Indian Gi...
Booking open Available Pune Call Girls Pargaon 6297143586 Call Hot Indian Gi...Call Girls in Nagpur High Profile
 
chapter 5.pptx: drainage and irrigation engineering
chapter 5.pptx: drainage and irrigation engineeringchapter 5.pptx: drainage and irrigation engineering
chapter 5.pptx: drainage and irrigation engineeringmulugeta48
 
UNIT-IFLUID PROPERTIES & FLOW CHARACTERISTICS
UNIT-IFLUID PROPERTIES & FLOW CHARACTERISTICSUNIT-IFLUID PROPERTIES & FLOW CHARACTERISTICS
UNIT-IFLUID PROPERTIES & FLOW CHARACTERISTICSrknatarajan
 
UNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and workingUNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and workingrknatarajan
 
result management system report for college project
result management system report for college projectresult management system report for college project
result management system report for college projectTonystark477637
 
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Call Girls in Nagpur High Profile
 
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...Call Girls in Nagpur High Profile
 
Thermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.pptThermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.pptDineshKumar4165
 
data_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdfdata_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdfJiananWang21
 
Generative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPTGenerative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPTbhaskargani46
 
Call Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance BookingCall Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance Bookingroncy bisnoi
 
Thermal Engineering Unit - I & II . ppt
Thermal Engineering  Unit - I & II . pptThermal Engineering  Unit - I & II . ppt
Thermal Engineering Unit - I & II . pptDineshKumar4165
 
PVC VS. FIBERGLASS (FRP) GRAVITY SEWER - UNI BELL
PVC VS. FIBERGLASS (FRP) GRAVITY SEWER - UNI BELLPVC VS. FIBERGLASS (FRP) GRAVITY SEWER - UNI BELL
PVC VS. FIBERGLASS (FRP) GRAVITY SEWER - UNI BELLManishPatel169454
 
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...ranjana rawat
 
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Christo Ananth
 

Kürzlich hochgeladen (20)

The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
 
Booking open Available Pune Call Girls Pargaon 6297143586 Call Hot Indian Gi...
Booking open Available Pune Call Girls Pargaon  6297143586 Call Hot Indian Gi...Booking open Available Pune Call Girls Pargaon  6297143586 Call Hot Indian Gi...
Booking open Available Pune Call Girls Pargaon 6297143586 Call Hot Indian Gi...
 
chapter 5.pptx: drainage and irrigation engineering
chapter 5.pptx: drainage and irrigation engineeringchapter 5.pptx: drainage and irrigation engineering
chapter 5.pptx: drainage and irrigation engineering
 
Water Industry Process Automation & Control Monthly - April 2024
Water Industry Process Automation & Control Monthly - April 2024Water Industry Process Automation & Control Monthly - April 2024
Water Industry Process Automation & Control Monthly - April 2024
 
UNIT-IFLUID PROPERTIES & FLOW CHARACTERISTICS
UNIT-IFLUID PROPERTIES & FLOW CHARACTERISTICSUNIT-IFLUID PROPERTIES & FLOW CHARACTERISTICS
UNIT-IFLUID PROPERTIES & FLOW CHARACTERISTICS
 
UNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and workingUNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and working
 
result management system report for college project
result management system report for college projectresult management system report for college project
result management system report for college project
 
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
 
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
 
(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7
(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7
(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7
 
Thermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.pptThermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.ppt
 
data_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdfdata_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdf
 
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort ServiceCall Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
 
Generative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPTGenerative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPT
 
Call Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance BookingCall Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance Booking
 
Thermal Engineering Unit - I & II . ppt
Thermal Engineering  Unit - I & II . pptThermal Engineering  Unit - I & II . ppt
Thermal Engineering Unit - I & II . ppt
 
PVC VS. FIBERGLASS (FRP) GRAVITY SEWER - UNI BELL
PVC VS. FIBERGLASS (FRP) GRAVITY SEWER - UNI BELLPVC VS. FIBERGLASS (FRP) GRAVITY SEWER - UNI BELL
PVC VS. FIBERGLASS (FRP) GRAVITY SEWER - UNI BELL
 
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
 
(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7
(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7
(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7
 
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
 

Effectively Reuse the Code Between PHP Projects

  • 1. Effectively Reuse the Code Between PHP Projects
  • 2. www.oroinc.com Andrey Yatsenko Passionate about Symfony & DX - Trainer - Developer - Community Evangelist
  • 3. 7 offices in 5 Countries (USA , Germany, France, Ukraine, Poland) Global Partner Network Open-source applications About Oro Inc. www.oroinc.com
  • 4.
  • 5. Oro Applications 11 Applications ● commerce ● commerce-crm ● commerce-crm-de ● commerce-crm-ee ● commerce-crm-ee-de ● commerce-demo ● commerce-enterprise ● crm ● crm-demo ● crm-enterprise ● platform
  • 6. How to share code between applications?
  • 7. #1 Copy & Paste ● Easy to do ● Hard to maintain the changes End up with many versions of the same package
  • 8. #2 Don’t reinvent the wheel Reuse as much as you can!
  • 9. #2 Don’t reinvent the wheel At ORO we don't. ● 190+ production dependencies ● 760+ dev & testing dependencies
  • 10. #3 Many Repositories ● Every reusable package is a separate GIT repository ● Application repositories require package repositories
  • 11. What to extract to the package? We can declare every Symfony bundle as a new package.
  • 12. What to extract to the package? We can declare every Symfony bundle as a new package. At ORO we have 170 + unique bundles
  • 13. What to extract to the package? Recommendations: 1. A single package has many related bundles 2. Start from big packages and extract when needed 3. Same root namespace for all the packages
  • 14. Oro Applications 11 Applications ● commerce ● commerce-crm ● commerce-crm-de ● commerce-crm-ee ● commerce-crm-ee-de ● commerce-demo ● commerce-enterprise ● crm ● crm-demo ● crm-enterprise ● platform 37 Reusable Packages Contain 170+ Bundles ● apruve ● authorizenet ● calendar ● call ● commerce ● commerce-crm ● commerce-crm-ee ● commerce-demo ● commerce-enterprise ● crm ● crm-demo ● crm-enterprise ● customer-portal ● demo-data ● dotmailer ● dpd ● ews ● german-localization ● google-hangout ● healthcheck ● infinitepay ● ldap ● magento-contact-us ● marketing ● oauth2-server ● outlook ● paypal-express ● platform ● platform-enterprise ● redis-config ● serialized-fields ● task ● test-security ● twig-inspector ● view-switcher ● wirecard ● zendesk
  • 15. How to attach packages to an application?
  • 16. # 3.1 Git Submodules ● Easy to start ● Hard to manage the code changes for a single task
  • 17. # 3.2 Composer Packages Each repo has its own composer.json ● Publish at Packagist.org ● Publish privately in Packagist.com or Satis ● Do not publish, but attach it as VCS repository
  • 18. Pros: ● Versioning ● Simplified dependency management Cons: ● Publishing is overhead ● Hard to manage the code changes for a single task # 3.2 Composer Packages
  • 19. What about storing all the projects in a single repo?
  • 20. What about storing all the projects in a single repo? And delivering/deploying only what we need to.
  • 21. #4 Monorepo ● All packages and applications are in a single repository ● Packages are not tight to a single technology ● Git Subtree allows to publish many repos from monorepo
  • 22. #4 Monorepo Pros: ● Easy to do cross package changes Cons: ● Repository size
  • 24. #4 Monorepo at ORO 11 Applications ● commerce ● commerce-crm ● commerce-crm-de ● commerce-crm-ee ● commerce-crm-ee-de ● commerce-demo ● commerce-enterprise ● crm ● crm-demo ● crm-enterprise ● platform 37 Reusable Packages Contain 170+ Bundles ● apruve ● authorizenet ● calendar ● call ● commerce ● commerce-crm ● commerce-crm-ee ● commerce-demo ● commerce-enterprise ● crm ● crm-demo ● crm-enterprise ● customer-portal ● demo-data ● dotmailer ● dpd ● ews ● german-localization ● google-hangout ● healthcheck ● infinitepay ● ldap ● magento-contact-us ● marketing ● oauth2-server ● outlook ● paypal-express ● platform ● platform-enterprise ● redis-config ● serialized-fields ● task ● test-security ● twig-inspector ● view-switcher ● wirecard ● zendesk
  • 25. Do all tools work with a monorepo?
  • 26. PHPStorm & Monorepo ● Excluded folders
  • 27. ● Custom CLI command to switch active application in a monorepo PHPStorm & Monorepo
  • 28. Git Subtree & Monorepo Automated split of the monorepo to many repositories Pros: ● Saved history ● Supports two way sync ● Easy to add new repository Cons: ● Requires CI integration
  • 29. GitHub Code Owners & Monorepo Define who is responsible for the code in .github/CODEOWNERS
  • 30. Summary No silver bullet Solutions: 1. Copy & Paste 2. Don't write the code 3. Many repos 3.1. Git Submodules 3.2. Composer Packages ■ Public ■ Private ■ Unpublished 4. Monorepo