No Code Attached Yet
avatar PhilETaylor
PhilETaylor
8 Jan 2021

Steps to reproduce the issue

Open a Joomla 4 beta 6 site in PHPStorm

Expected result

No warning

Actual result

Screenshot 2021-01-08 at 21 06 29

Now this could be a false warning, I'll reach out to the phpStorm project too to see if there is a way to identify what is causing this flag...

I thought at first it was the Symfony php8 pollyfill but after removing that and trying again I still got the same warning.

avatar PhilETaylor PhilETaylor - open - 8 Jan 2021
avatar joomla-cms-bot joomla-cms-bot - change - 8 Jan 2021
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - labeled - 8 Jan 2021
avatar PhilETaylor
PhilETaylor - comment - 8 Jan 2021

ok Found it.

The first issue should be ok as an attribute can be interpreted by PHP 7.2 as a comment.

Attributes are only allowed since PHP 8.0 in libraries/vendor/symfony/service-contracts/Attribute/Required.php

#[Attribute(Attribute::TARGET_METHOD | Attribute::TARGET_PROPERTY)]

The second issue is "Classes named String are forbidden in PHP 7"
in file. libraries/vendor/joomla/filesystem/src/Stream/String.php which is already deprecated.

class String extends StringWrapper

So we just ignore this right?

avatar HLeithner
HLeithner - comment - 9 Jan 2021

For the comment I think we have to ignore it but the filesystem package is interesting.

Because it seems that composer pulls joomla/filesystem 1.3 and not 2.0, the cms doesn't have a direct dependency on the Filesystem package and all dependencies require ^1.3| ^2.0 I'm not sure if it's intended to use 1.3 package in j4.

/cc @wilsonge

avatar wilsonge
wilsonge - comment - 9 Jan 2021

I suspect it's because composer is preferring the stable tag of the filesystem package. I suspect when we tag a 2.0 stable for the filesystem package we will pull in that. I'll tag a release blocker here to check. But I don't think there's explicitly anything we can do until we go to tag framework packages

avatar wilsonge wilsonge - change - 9 Jan 2021
Labels Added: ?
avatar wilsonge wilsonge - labeled - 9 Jan 2021
avatar wilsonge
wilsonge - comment - 9 Jan 2021

The symfony service contracts are tagged as 7.2.5 and higher. So I think we're pretty safe there. Just an IntelliJ bug

avatar wilsonge wilsonge - change - 10 Jan 2021
Title
[4b6] phpStorm says PHP8.0 features used in Joomla 4 Beta 6
[4b6] Filesystem package being used is still 1.x
avatar wilsonge wilsonge - edited - 10 Jan 2021
avatar HLeithner
HLeithner - comment - 11 Jan 2021

we can require ^2.0 in the cms because at the moment we test with the old version which should do the same but isn't the same code. When do we plan to tag stable for the framework?

Maybe this is true for other packages?

avatar wilsonge
wilsonge - comment - 11 Jan 2021

When do we plan to tag stable for the framework?

Unsure. Shouldn't be too long after we put the CMS into RC. A few weeks minimum before we tag stable in the CMS...

I don't think we should add explicit requires in the CMS for things we don't depend on...

To be honest we probably need to look at decoupling the filesystem package from the archive package anyhow because I don't think the archive package will inherit our FTP settings anyhow :/

avatar richard67
richard67 - comment - 13 Mar 2021

As far as I can see, the archive package has meanwhile been tagged with 2.0 Beta 4, which includes the change from PR joomla-framework/archive#26 , so what remains to be done is to update the CMS with that Beta 4 (it still used Beta 2 as far as I can see). Or am I missing something?

avatar rdeutz rdeutz - change - 6 Apr 2021
Labels Removed: ?
avatar rdeutz rdeutz - unlabeled - 6 Apr 2021
avatar brianteeman
brianteeman - comment - 3 Oct 2021

This should be closed now

avatar HLeithner HLeithner - change - 4 Oct 2021
Status New Closed
Closed_Date 0000-00-00 00:00:00 2021-10-04 06:07:54
Closed_By HLeithner
Labels Added: No Code Attached Yet
Removed: ?
avatar HLeithner HLeithner - close - 4 Oct 2021

Add a Comment

Login with GitHub to post a comment