From 43547d1e20bffed5e0253e78cf42a68dedebd35a Mon Sep 17 00:00:00 2001 From: paoloar77 Date: Tue, 13 Aug 2024 09:35:01 +0200 Subject: [PATCH 1/6] aa --- resources/views/ordini.blade.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/views/ordini.blade.php b/resources/views/ordini.blade.php index 95163523..53b50888 100644 --- a/resources/views/ordini.blade.php +++ b/resources/views/ordini.blade.php @@ -1,7 +1,7 @@ @foreach($orders as $order) @php $product = $order->product; - $titolo = $product + $titolo = $product && $product->permalink ? "{$product->name}" : ""; @endphp From fe7fc8efbc6c7ad05d44933d409b294639823c75 Mon Sep 17 00:00:00 2001 From: paoloar77 Date: Tue, 13 Aug 2024 09:36:20 +0200 Subject: [PATCH 2/6] aa --- resources/views/ordini.blade.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/views/ordini.blade.php b/resources/views/ordini.blade.php index 53b50888..662a974a 100644 --- a/resources/views/ordini.blade.php +++ b/resources/views/ordini.blade.php @@ -1,7 +1,7 @@ @foreach($orders as $order) @php $product = $order->product; - $titolo = $product && $product->permalink + $titolo = $product && isset($product->permalink) ? "{$product->name}" : ""; @endphp From 07840476c1a63760e9dc941274b9c141621638d0 Mon Sep 17 00:00:00 2001 From: paoloar77 Date: Tue, 13 Aug 2024 09:44:49 +0200 Subject: [PATCH 3/6] aa --- app/CustomFuncPao.php | 1 + 1 file changed, 1 insertion(+) diff --git a/app/CustomFuncPao.php b/app/CustomFuncPao.php index dd82a20b..d2461c51 100644 --- a/app/CustomFuncPao.php +++ b/app/CustomFuncPao.php @@ -497,6 +497,7 @@ function showOrdini() foreach ($orders as $order) { $product = Product::where('sku', $order->CodArticoloGM)->first(); + dd($product); // $product = null; if ($product) From a1ad996bf8cbed96aadf7a1aff15e1b914eea61d Mon Sep 17 00:00:00 2001 From: paoloar77 Date: Tue, 13 Aug 2024 10:56:34 +0200 Subject: [PATCH 4/6] aggio --- composer.json | 2 +- .../src/Illuminate/Container/Container.php | 48 ++++++++++++------- 2 files changed, 31 insertions(+), 19 deletions(-) diff --git a/composer.json b/composer.json index e7537bcb..4fceacb3 100644 --- a/composer.json +++ b/composer.json @@ -9,7 +9,7 @@ "license": "MIT", "require": { "php": "^7.2.5|^8.0", - "codexshaper/laravel-woocommerce": "^3.0", + "codexshaper/laravel-woocommerce": "^3.0.4", "fideloper/proxy": "^4.4", "guzzlehttp/guzzle": "^6.3.1|^7.0.1", "laravel/framework": "^7.29", diff --git a/vendor/laravel/framework/src/Illuminate/Container/Container.php b/vendor/laravel/framework/src/Illuminate/Container/Container.php index 28ec6362..90872106 100644 --- a/vendor/laravel/framework/src/Illuminate/Container/Container.php +++ b/vendor/laravel/framework/src/Illuminate/Container/Container.php @@ -12,6 +12,9 @@ use ReflectionClass; use ReflectionException; use ReflectionParameter; +use ReturnTypeWillChange; // Aggiungi questa riga in cima al file se non è già presente + + class Container implements ArrayAccess, ContainerContract { /** @@ -159,8 +162,8 @@ class Container implements ArrayAccess, ContainerContract public function bound($abstract) { return isset($this->bindings[$abstract]) || - isset($this->instances[$abstract]) || - $this->isAlias($abstract); + isset($this->instances[$abstract]) || + $this->isAlias($abstract); } /** @@ -184,7 +187,7 @@ class Container implements ArrayAccess, ContainerContract } return isset($this->resolved[$abstract]) || - isset($this->instances[$abstract]); + isset($this->instances[$abstract]); } /** @@ -196,8 +199,8 @@ class Container implements ArrayAccess, ContainerContract public function isShared($abstract) { return isset($this->instances[$abstract]) || - (isset($this->bindings[$abstract]['shared']) && - $this->bindings[$abstract]['shared'] === true); + (isset($this->bindings[$abstract]['shared']) && + $this->bindings[$abstract]['shared'] === true); } /** @@ -235,7 +238,7 @@ class Container implements ArrayAccess, ContainerContract // up inside its own Closure to give us more convenience when extending. if (! $concrete instanceof Closure) { if (! is_string($concrete)) { - throw new \TypeError(self::class.'::bind(): Argument #2 ($concrete) must be of type Closure|string|null'); + throw new \TypeError(self::class . '::bind(): Argument #2 ($concrete) must be of type Closure|string|null'); } $concrete = $this->getClosure($abstract, $concrete); @@ -266,7 +269,9 @@ class Container implements ArrayAccess, ContainerContract } return $container->resolve( - $concrete, $parameters, $raiseEvents = false + $concrete, + $parameters, + $raiseEvents = false ); }; } @@ -303,7 +308,7 @@ class Container implements ArrayAccess, ContainerContract protected function parseBindMethod($method) { if (is_array($method)) { - return $method[0].'@'.$method[1]; + return $method[0] . '@' . $method[1]; } return $method; @@ -875,8 +880,8 @@ class Container implements ArrayAccess, ContainerContract // primitive type which we can not resolve since it is not a class and // we will just bomb out with an error since we have no-where to go. $result = is_null(Util::getParameterClassName($dependency)) - ? $this->resolvePrimitive($dependency) - : $this->resolveClass($dependency); + ? $this->resolvePrimitive($dependency) + : $this->resolveClass($dependency); if ($dependency->isVariadic()) { $results = array_merge($results, $result); @@ -897,7 +902,8 @@ class Container implements ArrayAccess, ContainerContract protected function hasParameterOverride($dependency) { return array_key_exists( - $dependency->name, $this->getLastParameterOverride() + $dependency->name, + $this->getLastParameterOverride() ); } @@ -932,7 +938,7 @@ class Container implements ArrayAccess, ContainerContract */ protected function resolvePrimitive(ReflectionParameter $parameter) { - if (! is_null($concrete = $this->getContextualConcrete('$'.$parameter->getName()))) { + if (! is_null($concrete = $this->getContextualConcrete('$' . $parameter->getName()))) { return $concrete instanceof Closure ? $concrete($this) : $concrete; } @@ -955,8 +961,8 @@ class Container implements ArrayAccess, ContainerContract { try { return $parameter->isVariadic() - ? $this->resolveVariadicClass($parameter) - : $this->make(Util::getParameterClassName($parameter)); + ? $this->resolveVariadicClass($parameter) + : $this->make(Util::getParameterClassName($parameter)); } // If we can not resolve the class instance, we will check to see if the value @@ -1084,7 +1090,8 @@ class Container implements ArrayAccess, ContainerContract $this->fireCallbackArray($object, $this->globalResolvingCallbacks); $this->fireCallbackArray( - $object, $this->getCallbacksForType($abstract, $object, $this->resolvingCallbacks) + $object, + $this->getCallbacksForType($abstract, $object, $this->resolvingCallbacks) ); $this->fireAfterResolvingCallbacks($abstract, $object); @@ -1102,7 +1109,8 @@ class Container implements ArrayAccess, ContainerContract $this->fireCallbackArray($object, $this->globalAfterResolvingCallbacks); $this->fireCallbackArray( - $object, $this->getCallbacksForType($abstract, $object, $this->afterResolvingCallbacks) + $object, + $this->getCallbacksForType($abstract, $object, $this->afterResolvingCallbacks) ); } @@ -1267,6 +1275,7 @@ class Container implements ArrayAccess, ContainerContract * @param string $key * @return bool */ + #[\ReturnTypeWillChange] public function offsetExists($key) { return $this->bound($key); @@ -1278,7 +1287,8 @@ class Container implements ArrayAccess, ContainerContract * @param string $key * @return mixed */ - public function offsetGet($key) + #[\ReturnTypeWillChange] + public function offsetGet($key) { return $this->make($key); } @@ -1290,7 +1300,8 @@ class Container implements ArrayAccess, ContainerContract * @param mixed $value * @return void */ - public function offsetSet($key, $value) + #[\ReturnTypeWillChange] + public function offsetSet($key, $value) { $this->bind($key, $value instanceof Closure ? $value : function () use ($value) { return $value; @@ -1303,6 +1314,7 @@ class Container implements ArrayAccess, ContainerContract * @param string $key * @return void */ + #[\ReturnTypeWillChange] public function offsetUnset($key) { unset($this->bindings[$key], $this->instances[$key], $this->resolved[$key]); From 3e480c5b7e82a2961f2ba247a890d868ebe098a5 Mon Sep 17 00:00:00 2001 From: paoloar77 Date: Tue, 13 Aug 2024 11:02:00 +0200 Subject: [PATCH 5/6] update2 --- .../framework/src/Illuminate/Support/Collection.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/vendor/laravel/framework/src/Illuminate/Support/Collection.php b/vendor/laravel/framework/src/Illuminate/Support/Collection.php index 5aa8f6fb..e9a30e08 100644 --- a/vendor/laravel/framework/src/Illuminate/Support/Collection.php +++ b/vendor/laravel/framework/src/Illuminate/Support/Collection.php @@ -8,6 +8,8 @@ use Illuminate\Support\Traits\EnumeratesValues; use Illuminate\Support\Traits\Macroable; use stdClass; +use ReturnTypeWillChange; + class Collection implements ArrayAccess, Enumerable { use EnumeratesValues, Macroable; @@ -1291,7 +1293,8 @@ class Collection implements ArrayAccess, Enumerable * * @return \ArrayIterator */ - public function getIterator() + #[\ReturnTypeWillChange] + public function getIterator() { return new ArrayIterator($this->items); } @@ -1301,7 +1304,8 @@ class Collection implements ArrayAccess, Enumerable * * @return int */ - public function count() + #[\ReturnTypeWillChange] + public function count() { return count($this->items); } From deb8472fd39c195f9d512d945ce08ebb943c07f3 Mon Sep 17 00:00:00 2001 From: paoloar77 Date: Tue, 13 Aug 2024 15:22:21 +0200 Subject: [PATCH 6/6] aa --- app/CustomFuncPao.php | 20 ++++++++++++++++++++ composer.json | 9 ++++----- routes/web.php | 20 -------------------- 3 files changed, 24 insertions(+), 25 deletions(-) diff --git a/app/CustomFuncPao.php b/app/CustomFuncPao.php index d2461c51..5d93237c 100644 --- a/app/CustomFuncPao.php +++ b/app/CustomFuncPao.php @@ -2021,3 +2021,23 @@ function getClienti() return null; } } + +function getvalstr($mystr, $value, $separato = false) +{ + $my = ''; + if ($mystr) { + $my = " " . $mystr . ": " . $value; + } else { + $my = $value; + if (!$separato) { + $my = " " . $value; + } + } + + if ($separato) { + $my = '[' . $my . '] '; + } + + return $my; +} + diff --git a/composer.json b/composer.json index 4fceacb3..f9e94392 100644 --- a/composer.json +++ b/composer.json @@ -1,5 +1,4 @@ -{ - "name": "laravel/laravel", +"name": "laravel/laravel", "type": "project", "description": "The Laravel Framework.", "keywords": [ @@ -8,12 +7,12 @@ ], "license": "MIT", "require": { - "php": "^7.2.5|^8.0", + "php": "^8.2", "codexshaper/laravel-woocommerce": "^3.0.4", "fideloper/proxy": "^4.4", "guzzlehttp/guzzle": "^6.3.1|^7.0.1", - "laravel/framework": "^7.29", - "laravel/tinker": "^2.5", + "laravel/framework": "^8.0", + "laravel/tinker": "^2.9.0", "spatie/laravel-backup": "^6" }, "require-dev": { diff --git a/routes/web.php b/routes/web.php index b5188cb7..98214e35 100644 --- a/routes/web.php +++ b/routes/web.php @@ -1679,26 +1679,6 @@ Route::get('/autori_test', function () { } }); -function getvalstr($mystr, $value, $separato = false) -{ - $my = ''; - if ($mystr) { - $my = " " . $mystr . ": " . $value; - } else { - $my = $value; - if (!$separato) { - $my = " " . $value; - } - } - - if ($separato) { - $my = '[' . $my . '] '; - } - - return $my; -} - - Route::get('/test7/{name}', function ($name) { $articles = Article::join(DB::raw('(SELECT IdArticolo, MAX(DataOra) AS data FROM T_WEB_Articoli WHERE Titolo LIKE \'%' . $name . '%\' GROUP BY IdArticolo) b'), function ($join) { $join->on('T_WEB_Articoli.IdArticolo', '=', 'b.IdArticolo')