Comments (11)
Until this is fixed, I have excluded the parsedown-extra tests from my composer.json file by appending the tests folder from this package in exclude-from-classmap
:-
"autoload": {
"exclude-from-classmap": [
"vendor/erusev/parsedown-extra/test/"
]
}
I am hoping this can aid other people in getting rid of this warning until the package maintainer resolves the issue.
Edit: For further information on this see the composer documentation https://getcomposer.org/doc/04-schema.md#exclude-files-from-classmaps
from parsedown-extra.
+1
from parsedown-extra.
+1
from parsedown-extra.
With upcoming composer v2 this package will break on install, unless that workround keep working with composer v2.
from parsedown-extra.
I have tested this with the current preview build (2.0.0-RC2) and I did not see any problems with the autoloading. So I am pretty sure this should cover the release of v2.0. I will continue to relay any feedback/issues as I encounter them. At least this should let us use this package post 2.0 release (fingers crossed).
from parsedown-extra.
@lerouse the package maintainer would accept a PR? As I can see it is about just moving test file to the right folder.
Edit: declare files and test namespaces according standard.
from parsedown-extra.
I believe so, there is already a PR in #154 by @KentarouTakeda that would resolve this issue but the CI is failing on php v5.3 https://travis-ci.org/github/erusev/parsedown-extra/jobs/692841233
Which is using .gitattributes to ignore the test folder from the package (technically the better way to handle tests not being included in the package).
I am not sure if this will be fixed/merged at any point?
from parsedown-extra.
Deprecation Notice: Class ParsedownExtraTest located in ./vendor/erusev/parsedown-extra/test/ParsedownExtraTest.php does not comply with psr-0 autoloading standard. It will not autoload anymore in Composer v2.0. in phar:///usr/local/bin/composer/src/Composer/Autoload/ClassMapGenerator.php:201
- Actually, what is the part that's non-compliant?
test/TestParsedown.php
was not flagged by composer 1.x- Renaming
ParsedownExtraTest.php
toTestParsedownExtraTest.php
made the error go away. Is this a possible fix?
from parsedown-extra.
@bilogic I don't think PSR-0 says anything about not-namespaced classes; yet the classes here are supposed to be loaded through PSR-0 but they're not namespaced. Correct me if wrong.
from parsedown-extra.
I made a MR to parsedown
first, because parsedown suffers from a similar problem. If it were up to me, I would solve it first in parsedown, then in parsedown-extra.
However, my team and I were using this library only in a tiny use case, and now replaced it with different Commonmark parser.
I will leave this ticket open because it may be relevant for other people, but I might probably disengage from this conversation.
from parsedown-extra.
@bilogic I cannot answer your question (2) but I assume that Composer 1.x was loading the class anyway with something like a classmap (i.e. you'd have to run composer dump-autoload
every time if there were new or changed files in the vendor directory--(off topic) you probably don't care if this is a third-party library that you won't change yourself, but it is an inconvenience if it is your application code.
About question (3) I don't know, but like I mentioned, my team isn't using this library anymore now, so I won't keep an eye on this ticket.
from parsedown-extra.
Related Issues (20)
- Paragraphs/HTML blocks may disappear in HTML block with markdown="1" HOT 3
- Bug: Uninitialized string offset: 1
- Footnote HTML is double-escaped when safe mode is on HOT 1
- Can't embed video HOT 1
- The Footnotes stop working
- I'm getting this while composer update/install HOT 2
- Multiline blockquotes not rendering correctly in multiline footnotes
- Multiple blockquotes HOT 1
- Video HTML tag does not work
- Parsing special attributes {lang=fr} are not parsed HOT 1
- List Item is dropping text that follows a custom tag HOT 2
- PHP 8.2: mb_convert_encoding(): Handling HTML entities via mbstring is deprecated HOT 2
- Wrap image inside div - not working
- Demo broken? HOT 5
- Add support for PHP 8.2 HOT 2
- Deprecated: Use of "self" in callables is deprecated HOT 1
- Should we start looking for alternatives? Is this repo alive? HOT 1
- Deprecated: Use of "self" in callables is deprecated
- Html entity < escaped in code block if inside html container
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from parsedown-extra.