Skip to content
This repository has been archived by the owner on Oct 14, 2020. It is now read-only.

Fix autoloading #51

Closed
wants to merge 4 commits into from
Closed

Fix autoloading #51

wants to merge 4 commits into from

Conversation

W0rma
Copy link

@W0rma W0rma commented Mar 11, 2020

The directory structure in the folder "tests" is not compatible with PSR-0.

Therefore "classmap" should be used to ensure proper autoloading in composer. Since composer/composer#8652 which is part of the latest version 1.10 composer shows a warning.

@dereuromark
Copy link

We have the same issue.
Because oif new composer we get now those warnings as well

Might also be worth properly separating autoload and -dev, as tests should only be exposed through the latter, and not contaminate production map.
On top, it might be valuable to move to psr4 namespacing now.

@W0rma
Copy link
Author

W0rma commented Mar 16, 2020

Might also be worth properly separating autoload and -dev, as tests should only be exposed through the latter, and not contaminate production map.
On top, it might be valuable to move to psr4 namespacing now.

Good idea. I have updated my PR. PSR-4 is now used for src/ and tests/. Tests have been moved to autoload-dev.

Copy link

@boesing boesing left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Having autoload-dev is also a good extension to this project as there should be no need for test assets in any implementing project.

Having a .gitattributes file would help to exclude some files (e.g. Testassets) from the packagist archive aswell.

@@ -3,6 +3,7 @@ php:
- '7.1'
- '7.2'
- '7.3'
- '7.4'
- 'nightly'
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would drop this to make tests pass. There is actually no need to test against PHP 8.0 imho

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point. I moved nightly to allow failures

@boesing
Copy link

boesing commented Apr 7, 2020

@stephenfrank Would you merge this if tests pass?
Are you fine with removing nightly PHP 8 from tests?
Or probably moving nightly to allow failures instead?

@martinssipenko
Copy link
Contributor

Any updates on this?

@fr05t1k fr05t1k mentioned this pull request May 25, 2020
@fr05t1k
Copy link

fr05t1k commented May 25, 2020

#52

@Jeckerson
Copy link

Got same error message today.

@dereuromark
Copy link

dereuromark commented Jun 16, 2020

@stephenfrank What's the hold up? The PR was fine months ago. Many projects are facing this issue right now indirectly (by using a library that uses this one).

@simensen
Copy link

Is there anything we can do to help get this merged and a new tag cut? :) Would love to help if I can!

@martinssipenko
Copy link
Contributor

This project is now marked as abandoned and suggests using softcreatr/jsonpath as a replacement. If you think this issue is still relevant please open a new ticket under the new project.

https://github.com/SoftCreatR/JSONPath

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants