User tests: Successful: Unsuccessful:
Useful for public folder for example or only partial overrides.
Followup Pull Request for #40509 and prepare Pull Request for #41446.
Allow each JPATH constant to be overridden individually which allow us to only define 3 constants in the public folder index.php or any other bootstrap file.
Remove the need of _JDEFINED if custom constants have been defined.
SiteRouter uses now the JPATH_PUBLIC constant instead of the JPATH_SITE constant to find the index.php in the path to removes it from the request uri object.
joomla frontend, backend and api should work normally, with and without public folder
Works
More files in public folder
Works
Only index.php and extract.php in public folder.
Please select:
Documentation link for docs.joomla.org:
No documentation changes for docs.joomla.org needed
Pull Request link for manual.joomla.org:
No documentation changes for manual.joomla.org needed
Category | ⇒ | Administration Libraries |
Status | New | ⇒ | Pending |
Labels |
Added:
PR-5.0-dev
|
I never understood way I only can override one variable or all in defines...
Because this means we broke all sites that uses it own defines file when we added the JPATH_API
constant.
That's the reason I simple allow to override any constant for simplicity.
Then CLI script should generate only defines-public-folder.php not index.php
That was my initial approach to have only a custom defines (well I actually did a bit more) but I also like this take. It's simpler IMHO
Well, I wrote what I not like ?
At least please avoid hacking of index.php. create a separated file for generated defines.
I'm ok with either approaches, just make up your mind and let me know what will it be ?
Status | Pending | ⇒ | Fixed in Code Base |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2023-09-04 09:35:54 |
Closed_By | ⇒ | HLeithner |
TBH, looks dirty to me.
For #41446 we can do similar to
if (file_exists(dirname(__DIR__) . '/defines.php'))
:And you only check for
Then CLI script should generate only
defines-public-folder.php
notindex.php
app.php then will be like:
Or we better call it
defines-generated.php
ordefines-custom.php