Code Monkey home page Code Monkey logo

Comments (11)

lerouse avatar lerouse commented on August 17, 2024 4

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.

jadamec avatar jadamec commented on August 17, 2024

+1

from parsedown-extra.

vogelor avatar vogelor commented on August 17, 2024

+1

from parsedown-extra.

robsontenorio avatar robsontenorio commented on August 17, 2024

With upcoming composer v2 this package will break on install, unless that workround keep working with composer v2.

from parsedown-extra.

lerouse avatar lerouse commented on August 17, 2024

Screenshot 2020-10-19 at 09 35 08

@robsontenorio

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.

robsontenorio avatar robsontenorio commented on August 17, 2024

@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.

lerouse avatar lerouse commented on August 17, 2024

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.

bilogic avatar bilogic commented on August 17, 2024

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

  1. Actually, what is the part that's non-compliant?
  2. test/TestParsedown.php was not flagged by composer 1.x
  3. Renaming ParsedownExtraTest.php to TestParsedownExtraTest.php made the error go away. Is this a possible fix?

from parsedown-extra.

jleeothon avatar jleeothon commented on August 17, 2024

@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.

jleeothon avatar jleeothon commented on August 17, 2024

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.

erusev/parsedown#794

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.

jleeothon avatar jleeothon commented on August 17, 2024

@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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.