propelorm / Propel2

Propel2 is an open-source high-performance Object-Relational Mapping (ORM) for modern PHP
http://propelorm.org/
MIT License
1.26k stars 399 forks source link

Move templates into own root level. #1848

Closed dereuromark closed 2 years ago

dereuromark commented 2 years ago

Solves https://github.com/propelorm/Propel2/issues/1634

The idea:

Template paths are by convention in

Any extensions should follow the same convention or pass their custom path to renderTemplate()

BC Impact:

If needed, we could add a shim to lookup also in old "folder" - if not found in new primary location. This would mitigate the impact.

codecov-commenter commented 2 years ago

Codecov Report

Merging #1848 (5142f55) into master (94069d2) will increase coverage by 0.09%. The diff coverage is 92.50%.

@@             Coverage Diff              @@
##             master    #1848      +/-   ##
============================================
+ Coverage     87.75%   87.84%   +0.09%     
- Complexity     7761     7771      +10     
============================================
  Files           282      226      -56     
  Lines         21291    21048     -243     
============================================
- Hits          18684    18490     -194     
+ Misses         2607     2558      -49     
Flag Coverage Δ
5-max 87.84% <92.50%> (+0.09%) :arrow_up:
7.4 87.84% <92.50%> (+0.09%) :arrow_up:
agnostic 67.11% <70.00%> (+0.19%) :arrow_up:
mysql 69.10% <92.50%> (+0.08%) :arrow_up:
pgsql 69.12% <92.50%> (+0.08%) :arrow_up:
sqlite 66.93% <92.50%> (+0.06%) :arrow_up:

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
.../Propel/Generator/Builder/Om/AbstractOMBuilder.php 96.91% <80.00%> (+0.01%) :arrow_up:
src/Propel/Generator/Command/InitCommand.php 69.18% <83.33%> (-0.05%) :arrow_down:
src/Propel/Common/Util/PathTrait.php 95.23% <95.23%> (ø)
...nerator/Builder/Om/TableMapLoaderScriptBuilder.php 100.00% <100.00%> (ø)
src/Propel/Generator/Manager/MigrationManager.php 95.37% <100.00%> (+0.02%) :arrow_up:
src/Propel/Generator/Model/Behavior.php 95.06% <100.00%> (+1.31%) :arrow_up:
...mplates/Behavior/AggregateColumn/objectCompute.php
...emplates/Behavior/AggregateColumn/objectUpdate.php
...s/Behavior/AggregateColumn/objectUpdateRelated.php
...ates/Behavior/AggregateColumn/queryFindRelated.php
... and 53 more

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 94069d2...5142f55. Read the comment docs.

dereuromark commented 2 years ago

@mringler @nederdirk What do you think about it? Any concerns or input?

dereuromark commented 2 years ago

I will merge now. Let me know if we need to enable BC path lookup shim for the beta release - if needed.