Code Monkey home page Code Monkey logo

support's People

Contributors

arcanedev-maroc avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

support's Issues

Collection::whereIn() signature doesn't match Laravel 5.3

The new whereIn() function in L5.3 has a new signature. This is throwing an error:

public function whereIn($key, array $values, $strict = true)
{
    return $this->filter(function ($item) use ($key, $values, $strict) {
        return in_array(data_get($item, $key), $values, $strict);
    });
}

in L5.3 it has no declaration for array type:

public function whereIn($key, $values, $strict = true)

I'm getting:

ErrorException in Collection.php line 0: Declaration of Arcanedev\Support\Collection::whereIn($key, array $values, $strict = true) should be compatible with Illuminate\Support\Collection::whereIn($key, $values, $strict = false)

Removing array will be backwards compatible andalso fix this problem

constant.php keep getting delete in my system.

  • Support Version: 4.5.0
  • Laravel Version: 5.8
  • PHP Version: 7.3.9

Description:

From my project/vendor/arcandev/support folder, constant.php is kept deleting itself in every 10-15 mins. I have to delete the vendor folder and re-run composer install to work. is it a bug in your package or it is something in my end? Is there any solution that I can fix permanently this issue?

Steps To Reproduce:

request() helper doesn't match Laravel >= 5.3

  • Support Version: 4.1.4
  • Laravel Version: 5.4.15
  • PHP Version: 5.6.29

Description:

I'm using the arcanedev/log-viewer package, and for some reason composer loads helpers.php from this package before laravel's foundation helpers file. The request() helper here is not compatible with the one shipped after Laravel 5.3, and returns null when passing an array.

See: https://github.com/laravel/framework/blob/5.4/src/Illuminate/Foundation/helpers.php#L661

Steps To Reproduce:

  1. Install arcanedev/log-viewer

  2. Add the following route:

Route::get('test', function () {
    dump(request(['foo', 'bar']));
});
  1. Go to /test?foo=1&bar=2

The response is null instead of ['foo' => 1, 'bar' => 2] .

Issue with addRouteFromFile method.

I've installed your LogViewer package but the routes not working. I drilled the problem down to your method "addRouteFromFile" in your support package. The second parameter $needle has a default value set to "Routes\".

    private function addRouteFromFile(SplFileInfo $file, $needle = 'Routes\\')
    {
        if ($file->isFile() && pathinfo($file, PATHINFO_EXTENSION) === 'php') {
            $pos = strpos($file->getRealPath(), $needle);

            echo '<pre>' . print_r($file->getRealPath(), 1) . '</pre>';
            var_dump($pos);

            if ($pos !== false) {
                $route  = substr(
                    str_replace('.php', '', $file->getRealPath()),
                    $pos + strlen($needle)
                );
                $this->addRoute($route);
            }
        }
    }

I've printed out the real path of $file which is "/home/vagrant/Code/project/vendor/arcanedev/log-viewer/src/Http/Routes/LogViewerRoute.php" in my case. As you can see the $needle is not matching my path so the pos will be false and the routes will never be registered. Please have a look. My temporary fix is to remove the backslashes and increase $pos + 1.

Collection File missing?

Just made an upgrade of the package and got an error: Class Collection not found.
I think the /src/Collection.php is not inlcuded in this release.

"Class 'Arcanedev\Support\Collection' not found"

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.