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

Fixing the compatibility error #582

Merged
merged 9 commits into from
Jan 20, 2025

Conversation

Orunov-Alikhan
Copy link
Contributor

No description provided.

@Orunov-Alikhan
Copy link
Contributor Author

Orunov-Alikhan commented Jan 13, 2025

Adjusted PHP version in composer.json to >=7.4 || >=8.0 for consistency with documentation.
Updated README to reflect the new PHP version requirements.  
Modified .travis.yml to align CI testing with PHP 7.4 and above.

issue 573

@bessudnov
Copy link
Collaborator

только изначально была идея, чтобы осталась поддержка php71, так как много пользователей библиотеке на этой старой версии php

если поднимать на 74, то нужно тогда везде типизацию прикручивать и другой сахар, и выпускать как мажорный релиз, а небольшие изменения (прям критичные багфиксы) выпускать и в 1.x, и в 2.x

так что в этой задаче давай не уходить в деление, а всё таки обеспечим просто корректную поддержку

@Orunov-Alikhan
Copy link
Contributor Author

Orunov-Alikhan commented Jan 17, 2025

Добавлена поддержка lcobucci/clock версии 1.1.0 для обеспечения совместимости с PHP 7.1.
При попытке установки более новых версий библиотеки на PHP 7.1 возникают ошибки совместимости:

- lcobucci/clock 2.0.0 requires php ^7.4 || ^8.0 -> your php version (7.1.33) does not satisfy that requirement. 
- lcobucci/clock[2.1.0, ..., 2.2.0] require php ^8.0 -> your php version (7.1.33) does not satisfy that requirement.
- lcobucci/clock 2.3.0 requires php ~8.1.0 || ~8.2.0 -> your php version (7.1.33) does not satisfy that requirement.

Для сохранения поддержки как старых, так и новых окружений, зависимость была изменена на:

"lcobucci/clock": "1.1.0 || ^2.0.0"

какая версия lcobucci/clock ставится в зависимости от версии PHP
7.1 -> 1.1.0
7.4 -> 2.0.0
8.0 -> 2.2.0
8.1 -> 2.3.0
8.2 -> 2.3.0
8.3 -> 2.2.0
8.4 -> 2.2.0

проверял с версии composer 2.2.25  и 1.10.27

Класс в котором используется lcobucci/clock:

  • src/Oauth/AmoCRMOAuth.php/AmoCRMOAuth

Это изменение позволяет:

  • Устранить ошибку совместимости для PHP 7.1
  • Использовать версию lcobucci/clock 1.1.0 на PHP 7.1.
  • Устанавливать актуальные версии библиотеки (начиная с 2.0.0) для PHP 7.4 и выше.

@Orunov-Alikhan Orunov-Alikhan changed the title changed the minimum php version in the description Fixing the compatibility error Jan 20, 2025
@bessudnov bessudnov merged commit c680303 into amocrm:master Jan 20, 2025
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 this pull request may close these issues.

2 participants