In @kev1n's recent commit, was it necessary to now migrate all Array() constructs to [] constructs?
Such sudden syntax changes should be done in a single commit when a version changes but only after all current stable deployment users have had sufficient time to evaluate their PHP versions and their readiness to change thereafter. Even though such new syntax has been with us for quite a while.
If such commits are there, then merging with the current stable branch will become a nightmare.
Welcome to the nuBuilder Forums!
Register and log in to access exclusive forums and content available only to registered users.
Register and log in to access exclusive forums and content available only to registered users.
PHP 8 Array constructs
-
- Posts: 249
- Joined: Sun Dec 06, 2020 6:50 am
- Location: Chennai, India, Singapore
PHP 8 Array constructs
You do not have the required permissions to view the files attached to this post.
-
- nuBuilder Team
- Posts: 4307
- Joined: Sun Oct 14, 2018 6:43 pm
- Has thanked: 71 times
- Been thanked: 448 times
- Contact:
Re: PHP 8 Array constructs
Short array syntax was already used almost 2 years ago. E.g. see in https://github.com/steven-copley/nubuil ... logins.php, this is not a sudden change.apmuthu wrote:In @kev1n's recent commit, was it necessary to now migrate all Array() constructs to [] constructs?
One of the most important reasons to update PHP is to ensure you are running on a version that is fully supported and patched regularly for security vulnerabilities. PHP 5.4 has not been patched since 2015.
-
- Posts: 249
- Joined: Sun Dec 06, 2020 6:50 am
- Location: Chennai, India, Singapore
Re: PHP 8 Array constructs
2 years is a very short period indeed in the over 20 years of PHP's existence and in quite some years since nuBuilder gained users. Please go slow on this score as it is likely to break many installs and lose users. My 2c.
At the very least list the files and their lines in a separate file with possibility of alternate constructs to avoid too many "help" posts.
At the very least list the files and their lines in a separate file with possibility of alternate constructs to avoid too many "help" posts.
You do not have the required permissions to view the files attached to this post.
-
- nuBuilder Team
- Posts: 4307
- Joined: Sun Oct 14, 2018 6:43 pm
- Has thanked: 71 times
- Been thanked: 448 times
- Contact:
Re: PHP 8 Array constructs
My point is that the short array syntax is already used in the current stable version. And only users who are on version 4 can migrate to the new (currently dev) version. For older versions, there is no migration path to nuBuilder Forte.apmuthu wrote:2 years is a very short period indeed in the over 20 years of PHP's existence and in quite some years since nuBuilder gained users. Please go slow on this score as it is likely to break many installs and lose users. My 2c.
That also means, that the current version is only compatible with PHP 5.4 onwards.
That's why it's not going no be an issue. If you want compatiblity with PHP < 5.4, you will have to use nuBuilder v.3 or make v.4 compatible with it.
-
- nuBuilder Team
- Posts: 506
- Joined: Fri Dec 28, 2018 1:41 pm
- Location: Krakow, Poland
- Has thanked: 8 times
- Been thanked: 18 times
Re: PHP 8 Array constructs
What I can see the "=[]" is already introduced to nuBuilder Forte more then one year ago and no one was reported any issue for that.
So every one having application build in V4 will have no issue.
I was testing my old DB created on the V4 version in Dec 2018 and is working fine on latest development version.
Of course styling is different and it's the only issue I can see and would need to work on if I would like to use latest release - but it's normal.
So every one having application build in V4 will have no issue.
I was testing my old DB created on the V4 version in Dec 2018 and is working fine on latest development version.
Of course styling is different and it's the only issue I can see and would need to work on if I would like to use latest release - but it's normal.
If you like nuBuilder, please leave a review on SourceForge
-
- Posts: 249
- Joined: Sun Dec 06, 2020 6:50 am
- Location: Chennai, India, Singapore
Re: PHP 8 Array constructs
@Janusz: Thanks for the info. I had assumed that early v4 users may be stuck and as it was just a year ago, that should be fine then.
Will try to make a list of files and lines that may need changing for backward compatibility although it may be a tad difficult to maintain even if only for v4 before v4.5 dev becomes master.
Will try to make a list of files and lines that may need changing for backward compatibility although it may be a tad difficult to maintain even if only for v4 before v4.5 dev becomes master.
-
- nuBuilder Team
- Posts: 506
- Joined: Fri Dec 28, 2018 1:41 pm
- Location: Krakow, Poland
- Has thanked: 8 times
- Been thanked: 18 times
Re: PHP 8 Array constructs
To test more I used the original nuBuilder Forte version dated Jan 19 2019.
After unpack tried to run that installation under php 8.0 - and it was not possible even to log in (and it's normal as it was not developed at that time for php 8.0)
Next I used the original sql file
434900 Jan 19 2019 nubuilder4.sql
with latest development version from kev1n and was able to start without any issue and with no errors on system level or in console.
So if someone would like to convert older nuBuilder Forte DB's to latest version - it should not be difficult.
The biggest work would be with css - as initial Forte version was much different comparing the the current official release.
After unpack tried to run that installation under php 8.0 - and it was not possible even to log in (and it's normal as it was not developed at that time for php 8.0)
Next I used the original sql file
434900 Jan 19 2019 nubuilder4.sql
with latest development version from kev1n and was able to start without any issue and with no errors on system level or in console.
So if someone would like to convert older nuBuilder Forte DB's to latest version - it should not be difficult.
The biggest work would be with css - as initial Forte version was much different comparing the the current official release.
If you like nuBuilder, please leave a review on SourceForge