joomla-framework / console Goto Github PK
View Code? Open in Web Editor NEWJoomla Framework Console Package
License: GNU General Public License v2.0
Joomla Framework Console Package
License: GNU General Public License v2.0
Use smart search component on the frontend with a test query
Show search results
0 array_merge() does not accept unknown named parameters
Joomla 4 Beta 8 - Dev
PHP 8.0 - fpm
NGINX
I have fixed / bypassed error as follows
components/com_finder/src/Model/SearchModel.php line 289
For reference please see the CMS repo issue joomla/joomla-cms#38518 and tagging @nibra so we can carry the discussion here.
The issue in the CMS repo had to do with CMS–specific classes always expecting to run in a web context. For example, the CMS' MVCFactory service always creates MVCFactory factory objects after pushing a SiteRouter service to them. Creating the SiteRouter service requires instantiating the SiteApplication object which which assumes it's running in a web context, therefore expects $_SERVER['HTTP_HOST']
to contain an actual domain name. However, under CLI this contains the path the PHP script we passed to the PHP executable which cannot be parsed as a domain name, causing an exception to be apt out by the Uri framework object.
Question 1: Since the framework is isolated from the CMS, wouldn't it stand to reason that a developer extending the framework Console package would be aware of the CLI–only execution context and not engage in this kind of tomfoolery?
The solution in the CMS repo is to pass a --live-site
option which contains the URL to the site the CLI application corresponds to. If this is not available, it will fall back to the application's live_site
configuration key. If that is also empty / undefined it will fall back to a fake domain name.
Question 2: Since the framework console application does not have a configuration registry this would be impossible to do. Wouldn't that mean that we would always fall back to the fake domain name, necessitating overriding the method which handles the --live-site
option in the CMS?
Question 3: Assuming questions 1 and 2 are answered in the affirmative, would that not mean that the point of having a --live-site
option in the framework console application is rather moot?
I mean, sure, I can transfer (parts of) the code to the framework, but does it make sense / does the code belong in the framework? That was why I was sceptical yesterday and why @HLeithner told me I should modify the CMS console application instead.
Per all our other framework repos this should be ported to drone from travis
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.