arcanedev / support Goto Github PK
View Code? Open in Web Editor NEW:muscle: Support package is a collection of helpers and tools for ARCANEDEV + Laravel projects.
License: MIT License
:muscle: Support package is a collection of helpers and tools for ARCANEDEV + Laravel projects.
License: MIT License
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
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?
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
Install arcanedev/log-viewer
Add the following route:
Route::get('test', function () {
dump(request(['foo', 'bar']));
});
/test?foo=1&bar=2
The response is null
instead of ['foo' => 1, 'bar' => 2]
.
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.
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"
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.