Category : php-8

hello friends I want to ask, why the data is not deleted? I have clicked on it but in the database it is not deleted. My php version 8 migration public function up() { Schema::create(‘role_akun’, function (Blueprint $table) { $table->id(); $table->string(‘nama_role’)->unique(); $table->string(‘roles’); $table->timestamps(); }); } controller in function destroy public function destroy(ManageROle $manageROle) { $manageROle->delete(); ..

Read more

I’ve just upgraded my (Windows 10 2004) system from PHP 7.4 to PHP 8.0.3. I did this by uninstalling then reinstalling XAMPP with the later version. I am developing a Laravel 8.0 application in VS Code v 1.55, and the application runs absolutely fine. However, every single namespace/use statement in every single .php file has ..

Read more

I have the following request validation rules in an controller. public function __invoke(Request $request) { $this->validate($request, [ ‘name’ => [‘required’, ‘unique:games,name’, ‘string’], ‘variant’ => [‘required’, ‘string’], ‘rules’ => [‘string’], ‘is_anonymous’ => [‘boolean’, ‘required’], ‘message_mode’ => [‘required’, new EnumRule(MessageModeEnum::class)], ‘powers’ => [‘required’, ‘array’], ‘powers.*’ => [‘distinct:ignore_case’, ‘required’, ‘string’], ]); } Below is the test I’m running ..

Read more

I want to upgrade php version to 8.0.2 with laravel 8, but getting below error while apply command composer update Problem 1 – Root composer.json requires php 8.0.2 but your php version (8.0.1) does not satisfy that requirement. Problem 2 – uepg/laravel-sybase[2.1.0, …, 2.1.2] require laravel/framework 5.* -> found laravel/framework[v5.0.0, …, 5.8.x-dev] but it conflicts ..

Read more

"score" => array:5 [▼ "home" => "3" "away" => "0" "ht" => array:2 [▼ "home" => "0" "away" => "0" ] "agg" => null "pen" => null ] Information::updateOrCreate([ ‘homeFT’ => $info[‘score’][‘home’], ‘awayFT’ => $info[‘score’][‘away’], ‘homeHT’ => $info[‘score’][‘ht’][‘home’], ‘awayHT’ => $info[‘score’][‘ht’][‘away’] ]); <– ‘homeHT’ => $info[‘score’][‘ht’][‘home’], — This Code –> Trying to access array offset ..

Read more

I have the following assertion in a feature test: // just a convenience method to post a CSV file $this->importData($postdata, $csv) ->assertStatus(200) ->assertExactJson([ "alert" => null, // response text copied from RoomController::import() "message" => sprintf(__("%d items were created or updated."), count($csv_data)), ]); This passes without issue in PHP 7.4. Without making any changes to my ..

Read more

After updating my PHP Version 7.2 to PHP Version 8 & run larave app command php artisan serve then show these errors. PHP Deprecated: Method ReflectionParameter::getClass() is deprecated in C:xampphtdocs..srcIlluminateContainerContainer.php on line 875. PHP Deprecated: Method ReflectionParameter::getClass() is deprecated in C:xampphtdocs..srcIlluminateContainerContainer.php on line 949. I am tired with these error. Sourc..

Read more

after updating my mac to php 8 laravel app stopped working, this is the error I’m getting: Deprecated: Method ReflectionParameter::getClass() is deprecated in /Users/…/Sites/…/vendor/laravel/framework/src/Illuminate/Container/Container.php on line 871 Deprecated: Method ReflectionParameter::getClass() is deprecated in /Users/…/Sites/…/vendor/laravel/framework/src/Illuminate/Container/Container.php on line 945 Deprecated: Method ReflectionParameter::getClass() is deprecated in /Users/…/Sites/…/vendor/laravel/framework/src/Illuminate/Container/Container.php on line 871 Deprecated: Method ReflectionParameter::getClass() is deprecated in /Users/…/Sites/…/vendor/laravel/framework/src/Illuminate/Container/Container.php on ..

Read more

GitHub action fails on laravel 8, using Laravel By GitHub Actions. issue while running composer install -q –no-ansi –no-interaction –no-scripts –prefer-dist composer install -q –no-ansi –no-interaction –no-scripts –prefer-dist shell: /bin/bash -e {0} Your lock file does not contain a compatible set of packages. Please run composer update. Error: Process completed with exit code 2. And ..

Read more

I just upgraded my php from 7.4.12 to 8.0.0 on my Ubuntu 20.04 server but my laravel project that worked fine on php 7, now return: Declaration of DoctrineDBALDriverPDOConnection::query() must be compatible with PDO::query(string $query, ?int $fetchMode = null, mixed …$fetchModeArgs) Is laravel 7 or 8 support PHP 8? when I try to update the ..

Read more

I use the guzzlehttp/guzzle package in Laravel 8. After upgrading to PHP 8, I get: SymfonyComponentErrorHandlerErrorFatalError: Invalid opcode 117/2/0. in file ../vendor/defuse/php-encryption/src/Core.php on line 412 composer.json: "require": { "php": "^8.0", "doctrine/dbal": "^2.12.1", "fideloper/proxy": "^4.4", "fruitcake/laravel-cors": "^2.0", "guzzlehttp/guzzle": "^7.2", "laravel/framework": "^8.12", "laravel/passport": "^10.0", "laravel/tinker": "^2.5", "ext-json": "*" }, "require-dev": { "facade/ignition": "^2.5", "fakerphp/faker": "^1.9.1", "mockery/mockery": "^1.4.2", ..

Read more