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

Upgrade Pico 2.1 to PHP 8.2/8.3 #706

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

pixelbrackets
Copy link

@pixelbrackets pixelbrackets commented Oct 22, 2024

This PR makes a Pico 2.1 instance compatible with PHP 8.2 and 8.3.

Notable changes:

  • Upgrade symfony/yaml config reader
  • Upgrade twig template engine
  • Raise supported PHP version
  • Remove pico/pico-deprecated - beeing backwards compatible makes upgrades harder
  • Remove redundant index files
  • Use pico/pico-composer to set up a project

Required changes for users running version 2.1:

  • Replace composer.json from pico/pico-composer to load Pico Core via Composer
  • Add all required folders to project root (config/, plugins/, themes/)
  • Convert config file from PHP to YAML
    • Watch out: Errors may happen due to wrong value types (eg. multiline text is not supported yet in the YAML parser)
  • Themes may need some tweaks:

Thats it, Pico runs smoth again with PHP 8.2 and 8.3. 🎉


🍫 Pico is a super nice project, dead simple to use and with a small footprint. It is stared and used by many, many developers. Unfortunately it ran into a feature creep during development of not one but two new versions, which resulted the project to appear abondoned. My proposal: if possible; merge this PR and tag a new version for people to use.
Cancel the discussions about new versions, hide the development branches mentally and formally (individual ideas can always be taken up again) and releases a simple upgrade version instead.

lib/Pico.php Outdated Show resolved Hide resolved
@Croydon
Copy link

Croydon commented Oct 23, 2024

Unfortunately it ran into a feature creep during development of not one but two new versions, which resulted the project to appear abondoned.

Agreed. Release more often with small changes is much better.

Make Pico compatible with PHP 8.2 and 8.3.

- Upgrade symfony/yaml config reader
- Upgrade twig template engine,
- Raise supported PHP version,
- Remove pico/pico-deprecated
- Remove redundant index files
- Use pico-composer to set up a project

Required Changes for users running version 2.1:

- Replace composer.json from pico/pico-composer to load Pico Core via Composer
- Add all required folders to project root (config/, plugins/, themes/)
- Convert config file from PHP to YAML
  - Errors may happen due to wrong value types (eg. multiline text is not supported)
- Themes may need some tweaks:
  - Themes need a YAML config as well
  - HTML files in themes need to be renamed to TWIG files
  - Replace twig condition »is_front_page« with »current_page.id == "index"«
  - Replace twig variable »page.excerpt« with »page.meta.Summary«

This comment was marked as outdated.

This comment was marked as outdated.

This comment was marked as outdated.

@mhzawadi
Copy link

please merge and I can then test the upgrade

This comment was marked as outdated.

This comment was marked as outdated.

@pixelbrackets
Copy link
Author

Since this ticket bot creates a reminder every few days: @PhrozenByte, I wrote you an e-mail a while ago concerning the Pico project. Would be cool to get in touch and discuss an idea how to resolve the stale condition. Best regards. Dan

This comment was marked as outdated.

This comment was marked as outdated.

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.

4 participants