GithubHelp home page GithubHelp logo

proai / lumen-annotations Goto Github PK

View Code? Open in Web Editor NEW
10.0 10.0 4.0 42 KB

:bookmark_tabs: Laravel Lumen 5 route and event binding annotations

License: MIT License

PHP 100.00%
annotations laravel-lumen php

lumen-annotations's People

Contributors

markusjwetzel avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

lumen-annotations's Issues

In the config, the slashes in the routes_namespace value breaks route:scan on a Mac

In config/annotations.php

'routes_namespace' => 'App\Http\Controllers'

This does not work on a Mac when using php artisan route:scan because this value is converted to a portion of a file path where slashes should be forward slashes. Here is the error returned by route:scan

[InvalidArgumentException]
The "/Users/me/Project/app/Http\Controllers" directory does not exist.

Note the inconsistent slashes in the reported path. Changing routes_namespaces to 'App/Http/Controllers' works correctly.

Expected behavior: When namespacing in PHP using back slashes is required so we expect that the value of routes_namespace should use back slashes, so the default value is correct and should work. However, when converting this namespace to a path in ProAI\Annotations\Metadata\ClassFinder::getClassesFromNamespace() these slashes should be converted to the correct file path format expected by the platform it is running on.

Not working in Linux

Does not work in linux. Get the following error.

[InvalidArgumentException]                                               
The "/var/www/clive-api/app\Http\Controllers" directory does not exist.

Please use PHP DIRECTORY_SEPERATOR constant.

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.