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

Fixes PHP 8.1 deprecated function calls with passing 'null' to 'trim'… #52

Merged
merged 1 commit into from
Nov 23, 2022

Conversation

hostep
Copy link
Contributor

@hostep hostep commented Nov 10, 2022

… which is no longer allowed.

Noticed this while preparing a project to be setup with Magento 2.4.5 and PHP 8.1 with PageDesigner installed and PageBuilder not installed.

Following errors popped up during bin/magento setup:install --cleanup-database ... on a clean database:

Deprecated Functionality: trim(): Passing null to parameter #1 ($string) of type string is deprecated in vendor/magenerds/pagedesigner/Plugin/Cms/Model/Page/PagePlugin.php on line 63

Deprecated Functionality: trim(): Passing null to parameter #1 ($string) of type string is deprecated in vendor/magenerds/pagedesigner/Plugin/Cms/Model/Block/BlockPlugin.php on line 63

See Passing null to non-nullable parameters of built-in functions section in https://www.php.net/manual/en/migration81.deprecated.php

This PR fixes this by first double checking if the $json is actually a string and not something else, like null.

@hostep
Copy link
Contributor Author

hostep commented Nov 23, 2022

Hi @Mardl, @sippsolutions: do you guys still maintain this project, or do you think everybody should move to Magento's PageBuilder instead? Because it's been pretty quiet here for the last couple of months 🙂

We currently try to avoid PageBuilder for existing projects, because we think - haven't verified this yet - that the migration from PageDesigner to PageBuilder might be a big effort.

@Mardl Mardl merged commit 6d6fee5 into Magenerds:master Nov 23, 2022
@Mardl
Copy link
Contributor

Mardl commented Nov 23, 2022

@hostep I merged your request an tag https://github.com/Magenerds/PageDesigner/releases/tag/4.3.2
Currently, I no longer actively maintain PageDesigner, as I use PageBuilder. I have never done a migration myself, so I can't report much about a meaningful migration.
Thanks for the PR.

@hostep
Copy link
Contributor Author

hostep commented Nov 24, 2022

Thanks for the new version! 🙂

@sippsolutions
Copy link
Member

Hi @hostep,
all our customers moved from PageDesigner to PageBuilder. We did not migrate anything as it was ok for all customers to manually save the content and move it to the page builder instance.
If you're strongly dependent on a working version of PageBuilder and would be open to maintain this repository, we could discuss about that internally.

@hostep
Copy link
Contributor Author

hostep commented Nov 25, 2022

Thanks for the feedback @sippsolutions

It's currently not needed to maintain PageDesigner, but if things change, I'll let you know 🙂

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