Git Product home page Git Product logo

autoload-drupal's People

Contributors

fenetikm avatar kasperg avatar prudloff-insite avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

autoload-drupal's Issues

How to load .module files?

I don't think .module files are loaded as one of my module has

define('ADOBE_CAPTIVATE_ZIP_UPLOAD_SUBFOLDER', '__uploaded__');

And in another, that constant is used. Psalm says undefined constant.

I understand .module files don't have namespace so these are not loaded, right?

Create a new release

Composer 2 compatibility was merged in december 2020, but no tagged release has been made yet, forcing people to require dev-master. Let me know if any work needs to be done before creating a new release, I'd be happy to help.

Support for functions?

This works great for classes and Phpactor :)

I also tried using it with PHPStan but it seems none of the functions are found:

------ --------------------------------------------------------------                                          
  Line   docroot/modules/custom/astra_site/src/Form/NodeFormAlter.php                                           
 ------ --------------------------------------------------------------                                          
  50     Function menu_ui_get_menu_link_defaults not found.                                                     
  59     Function t not found.                                                                                  
  68     Function menu_ui_get_menus not found.                                                                  
 ------ --------------------------------------------------------------                                          

Not really sure if anything can be done here - I guess maybe adding the .module files to composer?

Autocomplete not working for some Entity objects

Thanks for writing this plugin, it works great!

Autocomplete is working for most of my classes, but I'm having trouble in certain cases. For example if typing Drupal\taxonomy\Entity\Vocabulary-> it does not autocomplete. However if I edit docroot/core/modules/taxonomy/src/Entity/Vocabulary.php and remove the extends ConfigEntityBundleBase from the class, the autocomplete for Vocabulary starts working. Is this because Drupal\Core\Config\Entity\ConfigEntityBundleBase is not being recognized by composer's autoloader?

I tried manually adding the following to vendor/composer/autoload_psr4.php:

'Drupal\\Core\\Config\\Entity\\' => array($baseDir . '/docroot/core/lib/Drupal/Core/Config/Entity'),

but that didn't seem to work. Do you have thoughts on what I might be doing wrong? Thank you!

Here's my composer.json config in case that helps:

"autoload-drupal": {
  "modules": [
    "docroot/modules/contrib/",
    "docroot/core/modules/",
    "docroot/modules/custom/"
  ],

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.