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

Composer dependencies issue on a legacy site without composer on TYPO3v12 #1115

Closed
cstrizzolo opened this issue Nov 29, 2024 · 8 comments
Closed

Comments

@cstrizzolo
Copy link

I am trying to upgrade a legacy TYPO3v11 site with crawler 11.0.10 to TYPO3v12 with crawler 12.0.4.
I disabled the crawler extension before the upgrade to TYPO3v12. After the upgrade of TYPO3 I have also updated crawler to 12.0.4.
When I try to activate the crawler extension the following message gets displayed:

Composer detected issues in your platform: Your Composer dependencies require a PHP version ">= 8.2.0".

Please notice that my TYPO3 installation is a legacy one not set up with Composer. Actually, the composer package is not even installed on my server. Therefore the above message looks strange to me.

Any hints?

Environment

  • Crawler version(s): 12.0.4
  • TYPO3 version(s): 12.4.23
  • PHP version(s): 8.1.31
  • Is your TYPO3 installation set up with Composer (Composer Mode): no
@tomasnorre
Copy link
Owner

I would have to look into this, sounds strange to me too. Is there any indication from which file this errors is coming from, if you have any logs, you can replace hostnames, ips etc. before posting.

@cstrizzolo
Copy link
Author

The error is generated by line 19 in

typo3conf/ext/crawler/Resources/Private/Php/Libraries/vendor/composer/platform_check.php

Please let me know if any other check comes to mind.

@cstrizzolo
Copy link
Author

Actually, the message on the screen is generated by line 19 while the one in the log is written by line 22 of the same file.

@cstrizzolo
Copy link
Author

An additional error message I got after setting some debug flags:

PHP User Error: Composer detected issues in your platform: Your Composer dependencies require a PHP version ">= 8.2.0". You are running 8.1.31. in /(...)/typo3conf/ext/crawler/Resources/Private/Php/Libraries/vendor/composer/platform_check.php line 24

That's true, I am actually running PHP 8.1.31, but Composer is not installed so I can't understand why it's complaining.
PHP 8.1 is compatible with TYPO3v12, so a version >= 8.2.0 should not be required in any case.
I'm really puzzled.

@tomasnorre
Copy link
Owner

tomasnorre commented Dec 2, 2024

Thanks for the follow up. I don't know if this has changed recently. But at least it is as follows.

  1. https://github.com/tomasnorre/crawler/blob/main/ext_localconf.php#L7 include autoload.php
  2. autoload.php includes '/composer/autoload_real.php';
  3. autload_real.php include require __DIR__ . '/platform_check.php';

And therefor the check failure. I need to figure out, why the platform_check.php is writting as it is, because the workflow https://github.com/tomasnorre/crawler/blob/main/.github/workflows/Deploy.yml#L23 runs on PHP 8.1,

Perhaps it's a side effect of the Tailor Tool, but I would have to look more into this. But it's for sure a mistake. Will mark this as a bug.

I have just tried locally with PHP 8.1 and doing the composer install -d Resources/Private/Php/Libraries which is the command triggered by the deployment.

That gives me

<?php

// platform_check.php @generated by Composer

$issues = array();

if (!(PHP_VERSION_ID >= 80100)) {
    $issues[] = 'Your Composer dependencies require a PHP version ">= 8.1.0". You are running ' . PHP_VERSION . '.';
}

which is correct. So something in the build process is off. Perhaps I have simply published with the wrong version.

Version 12.0.0, 12.0.1, 12.0.2 doesn't include the libs at all (I knew about that but forgot). both 12.0.3 and 12.0.4 have a false version included, so probably me doing a wrong build.

Let me try to make a new release on of the following days.

@tomasnorre
Copy link
Owner

Here is a version with it fixed for now.

crawler-fix.zip

sha1sum   7623a3f9d785c7f94fb827dac64aeead00276af7  crawler-fix.zip
sha256sum 5f5b2c0d084acc41984bfbbdce1a557948ef22946f8942f5f0a42508995ac5ab  crawler-fix.zip
md5sum    34d70788e1c79f5e6253bd70c76ebd23  crawler-fix.zip

I have added the checksums, so that you can ensure that it hasn't be changed on the way.

It's build with PHP 8.1.30

Hope that will help you move forward till i have a new official release.

@cstrizzolo
Copy link
Author

The version you have built loads successfully and seems to work correctly.
Thank you very much.

@tomasnorre
Copy link
Owner

You're welcome, I'll ping you here, when there is a new official release.

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

No branches or pull requests

2 participants