Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compatibility issue with Magento #221

Closed
hugofintecture opened this issue Mar 28, 2023 · 4 comments · Fixed by #224
Closed

Compatibility issue with Magento #221

hugofintecture opened this issue Mar 28, 2023 · 4 comments · Fixed by #224

Comments

@hugofintecture
Copy link

hugofintecture commented Mar 28, 2023

@nicolas-grekas it seems recent changes reintroduced this issue with Magento:

[2023-03-27T14:28:49.214616+00:00] report.DEBUG: The class "Phalcon\HttpMessageRequest" for the generation of "Phalcon\HttpMessageRequestFactory" does not exist. {"exception":"[object] (RuntimeException(code: 0): The class "Phalcon Http Message Request" for the generation of "Phalcon Http Message Request Factory" does not exist. at /app/vendor/magento/framework/Code/Generator.php:223)"} []
[2023-03-27T14:28:49.214928+00:00] report.DEBUG: The "Phalcon\HttpMessage\Stream" class for the generation of "Phalcon\HttpMessage\StreamFactory" does not exist. {"exception":"[object] (RuntimeException(code: 0): The class "Phalcon Http Message" for the generation of "Phalcon Http Message" does not exist. at /app/vendor/magento/framework/Code/Generator.php:223)"} []

Could be related to this path you added?
\Phalcon\Http\Message\RequestFactory::class

Maybe it would be better to use a string there instead of the ::class syntax?

File src/Composer/Plugin.php line 239:

if (class_exists(\Phalcon\Http\Message\RequestFactory::class, false)) {
    $missingRequires[0]['psr/http-factory-implementation'] = [];
    $missingRequires[1]['psr/http-factory-implementation'] = [];
}

Thanks in advance!

@nicolas-grekas
Copy link
Collaborator

Would you mind sending a PR after confirming it works for you?

@hugofintecture
Copy link
Author

Yes I'll try that :)

@dbu
Copy link
Contributor

dbu commented Mar 31, 2023

ah true, we had to add a hack for magentos classloader:

public static function safeClassExists($class)

@dbu
Copy link
Contributor

dbu commented Mar 31, 2023

should be fixed with https://github.com/php-http/discovery/releases/tag/1.15.3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants