-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Improve generation of required php extensions #7960
Comments
Hi @hostep. Thank you for your report. Please, add a comment to assign the issue:
|
Related PR with a workaround: #7953 |
The input I've got from the packaging team:
|
Sorry, but that's just incorrect, Magento code strongly relies on code in the dependent packages, so their dependencies are implicitly also dependencies Magento needs. Just try executing |
Code of Magento and code called in its dependencies might not need |
cc @fascinosum |
In DevDocs, we use a Docker project that reproduces Magento installation using Composer on an environment with listed prerequisites to test the documentation. Here is the script for an environment setup for 2.4.0.
|
It's for ubuntu 20.04 |
And for Magento installation:
|
@dshevtsov: maybe I just tested this again on my local environment where I've explicitly disabled the
|
I agree with that. But since the application is huge and grows rapidly, and our resources are restricted, DevDocs focuses on the content that is directly related to the product. In this case, project dependencies vs dynamic dependencies. Content that is indirectly related to the product typically goes to the Magento Help Center. We cannot control dynamic dependencies, they can change at any time by the moment someone creates a new project, or runs And I see your point, that failed installation caused by missing components can be very confusing. Developers do not expect issues when they follow guidelines from official documentation. If we want to add the bare minimum to documentation that would include dynamic dependencies, it has to be automated and separated from project dependencies. The way to get extensions required for production could be We could add a subsection that would contain an example list generated at the time of release (or close to it) such as: Make sure your platform complies with requirements (items and versions can vary):
|
Look, please ask yourself the question why this documentation exist. Suppose a shop owner wants to setup a new Magento shop. He finds a good hosting company and the hosting company asks: "Well, what software should we install on your system?" The shop owner answers with a link to the system requirements documentation from the devdocs site, the hoster starts setting up everything and when push comes to shove and the shop owner wants to install Magento, it will turn out that certain things are still missing. Which is not good. We - as an agency - have our own documentation for hosting companies with all the requirements, since we don't trust the devdocs system requirements, which is unfortunate. Also: these "dynamic dependencies", their reliance on php extensions only changes very rarely. So if we would have a script to automatically generate the list of php extensions needed for Magento and run that with every new release of Magento, that would suffice more then enough in my opinion. I've looked into |
Just quickly tried something with the help of a json cli parser:
If we look at the difference here, there is none, so all the extensions listed here are required for Magento 2.4.1 If we then do the same for Magento 2.3.6, here are the results:
After
If we compare both lists, there are 2 differences here: @@ -7,14 +7,12 @@
ext-iconv
ext-intl
ext-json
- ext-libxml
ext-mbstring
ext-openssl
ext-pcre
ext-pdo_mysql
ext-simplexml
ext-soap
- ext-sockets
ext-xmlwriter
ext-xsl
ext-zip So in the case of Magento 2.3.x, it means that the sockets php extension isn't required, as is that ext-libxml entry (which seems to have been a mistake) Also: I don't know if we also have to parse out the If I compare the list from my test with Magento 2.4.1 with the devdocs requirements, that list is missing the following extensions:
|
@hostep, The packaging team confirmed that this can be used to publish dynamic dependencies. They also recommend to generate both lists for OpenSource and Commerce, because they can be different, even though in most cases they are the same. We will be implementing this into Docs automation. |
we need to list ext-fileinfo |
@medigeek, per #8933 (comment), the dependency is not required since the 2.4.2 version. |
Internal ticket: DOC-362 |
I'm going to use the following logic for the suggested scenario:
|
Resolved in 3ab7dec |
Awesome, thanks @dshevtsov ! |
Bug report
Description
The list of required php extensions in https://devdocs.magento.com/guides/v2.4/install-gde/system-requirements-tech.html#required-php-extensions is not accurate.
Currently it's generated from the composer.json file of the latest Magento version, but that's not accurate enough since all its dependency packages are not taken into account.
I suggested a possible solution in #7398 (comment) (also #7398 (comment)) to get a more accurate list, maybe someone can try that and see if that works and then somehow try to automate this.
Steps to reproduce
Expected result
ext-sockets
which became required in Magento 2.4.0Possible solutions
ext-sockets
which became required in Magento 2.4.0Additional information
This issue was opened at the request of @dshevtsov
The text was updated successfully, but these errors were encountered: