Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
52 commits
Select commit Hold shift + click to select a range
bdb53b9
feat: Laravel 12
yajra Feb 27, 2025
50000be
fix: prefix issues
yajra Feb 27, 2025
5416bbf
fix: getTables with schema
yajra Feb 27, 2025
01825f9
fix: parseSchemaAndTable
yajra Feb 27, 2025
54490bd
fix: schema builder prefix
yajra Feb 27, 2025
1ac9f4d
fix: oracle eloquent tests
yajra Feb 27, 2025
ac76165
fix: blueprint prefix and grammar
yajra Feb 27, 2025
a853930
fix: foreign key and schema handling
yajra Feb 27, 2025
8d2d674
fix: primary key sql
yajra Feb 27, 2025
1a76a45
fix: autoincrement, trigger and sequence
yajra Feb 27, 2025
c7b0d04
test: rename table
yajra Feb 27, 2025
8e48a40
fix: cs
yajra Feb 27, 2025
24b85bf
fix: handle ORA-08002 exception
yajra Feb 27, 2025
05c9166
fix: #780
yajra Feb 27, 2025
94a2239
test: ignore ORA-02248 error
yajra Feb 27, 2025
dd160c8
test: create demo schema
yajra Feb 27, 2025
f9b595f
refactor
yajra Feb 27, 2025
a3609d0
docs: prep v12
yajra Feb 27, 2025
effb315
chore: sensitive parameter
yajra Feb 27, 2025
4d3007c
refactor
yajra Feb 27, 2025
cfe1766
refactor: oracle eloquent
yajra Feb 27, 2025
7748ce1
fix: code style
yajra Feb 27, 2025
395e8f1
feat: move max length setting to connection
yajra Feb 27, 2025
e994ed6
fix: cs
yajra Feb 27, 2025
9667f2e
fix: cs
yajra Feb 27, 2025
18b4c48
fix: cs
yajra Feb 27, 2025
1be1a74
fix: sequence with schema prefix
yajra Feb 27, 2025
0e9d3ec
feat: withSchemaPrefix connection helper
yajra Feb 27, 2025
61e37b8
refactor: use prefix and max length from connection
yajra Feb 27, 2025
055c81e
test: sequence, trigger, schema
yajra Feb 27, 2025
d8f364e
test: set date format
yajra Feb 27, 2025
d317d58
refactor
yajra Feb 27, 2025
bf6535f
fix: cs
yajra Feb 27, 2025
7d608a0
fix: cs
yajra Feb 27, 2025
a2cb432
fix: cs
yajra Feb 27, 2025
9613776
fix: cs
yajra Feb 27, 2025
5213e21
chore: remove redundant helper
yajra Feb 27, 2025
35485a5
feat: pint
yajra Feb 27, 2025
dbff339
ci: pint
yajra Feb 27, 2025
a1113c7
ci: pint on 12+
yajra Feb 27, 2025
edeea6b
refactor: oracle processor
yajra Feb 28, 2025
8c2e1bd
feat: use date format from grammar
yajra Feb 28, 2025
4551770
fix: pint
yajra Feb 28, 2025
1ded37f
feat: phpstan lvl 1 and rector
yajra Feb 28, 2025
2341188
ci: fix
yajra Feb 28, 2025
7c61f18
ci: name
yajra Feb 28, 2025
54454eb
chore: git attributes
yajra Feb 28, 2025
0d3f46e
docs: update
yajra Feb 28, 2025
e564647
ci: simplify phpstan
yajra Feb 28, 2025
68cf28e
ci: name
yajra Feb 28, 2025
cfdf8ef
ci: run on *.x branch
yajra Feb 28, 2025
fc207f0
fix: schema prefix implementation
yajra Feb 28, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@
.editorconfig export-ignore
.gitattributes export-ignore
.gitignore export-ignore
.styleci.yml export-ignore
CHANGELOG.md export-ignore
CONDUCT.md export-ignore
phpunit.xml.dist export-ignore
oci8.sh export-ignore
phpstan.neon.dist export-ignore
pint.json export-ignore
rector.php export-ignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
name: tests
name: Continuous Integration

on:
push:
branches:
- master
- '*.x'
pull_request:
schedule:
- cron: '0 0 * * *'
Expand Down
31 changes: 31 additions & 0 deletions .github/workflows/pint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: PHP Linting
on:
pull_request:
push:
branches:
- master
- 12.x
jobs:
pint:
name: "Pint"

runs-on: ubuntu-latest

permissions:
contents: write
pull-requests: write

steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}

- name: "laravel-pint"
uses: aglipanci/laravel-pint-action@latest
with:
preset: laravel
verboseMode: true

- uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: "fix: pint :robot:"
43 changes: 43 additions & 0 deletions .github/workflows/static-analysis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: "Static Analysis"

on:
push:
branches:
- master
- 12.x

pull_request:

schedule:
- cron: '0 0 * * *'

jobs:
static-analysis-phpstan:

name: Source Code
runs-on: ubuntu-latest

strategy:
fail-fast: true

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: 8.2
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, gd, memcached, oci8
tools: composer:v2
coverage: none

- name: Install dependencies
uses: nick-fields/retry@v3
with:
timeout_minutes: 5
max_attempts: 5
command: composer update --prefer-stable --prefer-dist --no-interaction --no-progress

- name: Run Static Analysis
run: vendor/bin/phpstan
1 change: 0 additions & 1 deletion .styleci.yml

This file was deleted.

99 changes: 8 additions & 91 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,95 +1,12 @@
# Laravel-OCI8 CHANGELOG

## [Unreleased](https://github.com/yajra/laravel-oci8/compare/master...10.x)
## [Unreleased](https://github.com/yajra/laravel-oci8/compare/master...12.x)

## [v11.6.4](https://github.com/yajra/laravel-oci8/compare/v11.6.3...v11.6.4) - 2024-12-31

- fix: OracleGrammar::compileDropAllTables method to ignore secondary objects. #897
- fix: #896

## [v11.6.3](https://github.com/yajra/laravel-oci8/compare/v11.6.2...v11.6.3) - 2024-12-15

- fix: 🐛 multibyte object name causes error #895

## [v11.6.2](https://github.com/yajra/laravel-oci8/compare/v11.6.1...v11.6.2) - 2024-09-09

- fix: #890
- fix: #891
- remove: v11.6.1 tagged on wrong branch.

## [v11.6.1](https://github.com/yajra/laravel-oci8/compare/v11.6.0...v11.6.1) - 2024-09-07

- fix: missing prefix on table alias #889
- fix: #886
- fix: #875

## [v11.6.0](https://github.com/yajra/laravel-oci8/compare/v11.5.1...v11.6.0) - 2024-08-01

- feat: Add whereLike clause to query builder #874

## [v11.5.1](https://github.com/yajra/laravel-oci8/compare/v11.5.0...v11.5.1) - 2024-08-01

- fix: Added "order by" clause to compileColumnExists #873
- fix: #871

## [v11.5.0](https://github.com/yajra/laravel-oci8/compare/v11.4.1...v11.5.0) - 2024-07-31

- feat: Implement compileTables missing method #868
- fix: Test for existence of AuthServiceProvider before trying to use it #872

## [v11.4.1](https://github.com/yajra/laravel-oci8/compare/v11.4.0...v11.4.1) - 2024-07-15

- fix: Laravel 11.15 compatibility #867
- fix: #864, #865

## [v11.4.0](https://github.com/yajra/laravel-oci8/compare/v11.3.0...v11.4.0) - 2024-07-13

- feat: disable/enable foreign keys #866
- fix: #863
- fix: #488

## [v11.3.0](https://github.com/yajra/laravel-oci8/compare/v11.2.5...v11.3.0) - 2024-05-25

- feat: add support for Schema::getIndexes #856

## [v11.2.5](https://github.com/yajra/laravel-oci8/compare/v11.2.4...v11.2.5) - 2024-05-22

- fix: schema due to removal of dbal #855
- fix: #852
- fix: rename column wrapping
- fix: modify column

## [v11.2.4](https://github.com/yajra/laravel-oci8/compare/v11.2.3...v11.2.4) - 2024-05-22

- fix: Schema::dropIfExists #854
- fix: #853

## [v11.2.3](https://github.com/yajra/laravel-oci8/compare/v11.2.2...v11.2.3) - 2024-05-07

- fix: pagination when sorting by string with same values #850
- revert: #611
- fix: #651

## [v11.2.2](https://github.com/yajra/laravel-oci8/compare/v11.2.1...v11.2.2) - 2024-04-24

- fix: migration when column name has space #849
- fix: index name when column name has space

## [v11.2.1](https://github.com/yajra/laravel-oci8/compare/v11.2.0...v11.2.1) - 2024-04-19

- fix: retry on lost connection #846

## [v11.2.0](https://github.com/yajra/laravel-oci8/compare/v11.1.0...v11.2.0) - 2024-04-16

- feat: add support for database cache store #844
- fix: #843
- fix: insertOrIgnore implementation

## [v11.1.0](https://github.com/yajra/laravel-oci8/compare/v11.0.0...v11.1.0) - 2024-04-11

- feat: Improve schema grammar #842

## [v11.0.0](https://github.com/yajra/laravel-oci8/compare/10.x...v11.0.0) - 2024-03-16

- Laravel 11
## v12.0.0 - 2025-02-27

- Laravel 12 support
- fix: [12.x] Fix accessing Connection property in Grammar classes laravel/framework#54487
- fix: generated constraint name to include prefix
- feat: sequence and trigger table wrapping
- fix: Cannot use sequences not owned by DB user #780
- feat: added phpstan and rector workflow
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,12 @@ Laravel-OCI8 is an Oracle Database Driver package for [Laravel](http://laravel.c
9.x | 9.x
10.x | 10.x
11.x | 11.x
12.x | 12.x

## Quick Installation

```bash
composer require yajra/laravel-oci8:^11
composer require yajra/laravel-oci8:^12
```

## Service Provider (Optional on Laravel 5.5+)
Expand Down
34 changes: 22 additions & 12 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,21 +19,21 @@
"php": "^8.2",
"ext-oci8": ">=3.0.1",
"ext-pdo": "*",
"illuminate/database": "^11.15.0",
"illuminate/pagination": "^11.15.0",
"illuminate/support": "^11.15.0",
"illuminate/validation": "^11.15.0",
"yajra/laravel-pdo-via-oci8": "^3.4.4"
"illuminate/database": "^12",
"illuminate/pagination": "^12",
"illuminate/support": "^12",
"illuminate/validation": "^12",
"yajra/laravel-pdo-via-oci8": "^3.7.1"
},
"require-dev": {
"larastan/larastan": "^3.1.0",
"laravel/pint": "^1.21",
"mockery/mockery": "^1.6.12",
"orchestra/testbench": "^9.1.2",
"phpunit/phpunit": "^10.5|^11.2.7"
"orchestra/testbench": "^10",
"phpunit/phpunit": "^10.5.35|^11.5.10|^12.0.1",
"rector/rector": "^2.0.9"
},
"autoload": {
"files": [
"src/helper.php"
],
"psr-4": {
"Yajra\\": "src/"
}
Expand All @@ -45,7 +45,7 @@
},
"extra": {
"branch-alias": {
"dev-master": "11.x-dev"
"dev-master": "12.x-dev"
},
"laravel": {
"providers": [
Expand All @@ -55,7 +55,17 @@
}
},
"scripts": {
"docker": "docker run -d -p 49160:22 -p 49161:1521 deepdiver/docker-oracle-xe-11g"
"docker": "docker run -d -p 49160:22 -p 49161:1521 deepdiver/docker-oracle-xe-11g",
"test": "./vendor/bin/phpunit",
"pint": "./vendor/bin/pint",
"rector": "./vendor/bin/rector",
"stan": "./vendor/bin/phpstan analyse --memory-limit=2G --ansi --no-progress --no-interaction --configuration=phpstan.neon.dist",
"pr": [
"@rector",
"@pint",
"@stan",
"@test"
]
},
"config": {
"sort-packages": true
Expand Down
17 changes: 17 additions & 0 deletions phpstan.neon.dist
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
includes:
- ./vendor/larastan/larastan/extension.neon

parameters:

paths:
- src

level: 1

ignoreErrors:
- '#Unsafe usage of new static\(\).#'

excludePaths:

noEnvCallsOutsideOfConfig: false
treatPhpDocTypesAsCertain: false
3 changes: 3 additions & 0 deletions pint.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"preset": "laravel"
}
22 changes: 22 additions & 0 deletions rector.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<?php

declare(strict_types=1);

use Rector\CodeQuality\Rector\Class_\InlineConstructorDefaultToPropertyRector;
use Rector\Config\RectorConfig;
use Rector\Set\ValueObject\LevelSetList;

return static function (RectorConfig $rectorConfig): void {
$rectorConfig->paths([
__DIR__.'/src',
__DIR__.'/tests',
]);

// register a single rule
$rectorConfig->rule(InlineConstructorDefaultToPropertyRector::class);

// define sets of rules
$rectorConfig->sets([
LevelSetList::UP_TO_PHP_82,
]);
};
8 changes: 3 additions & 5 deletions src/Oci8/Auth/OracleUserProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,18 @@
namespace Yajra\Oci8\Auth;

use Illuminate\Auth\EloquentUserProvider;
use Illuminate\Contracts\Auth\Authenticatable;
use Illuminate\Support\Str;

class OracleUserProvider extends EloquentUserProvider
{
/**
* Retrieve a user by the given credentials.
*
* @param array $credentials
* @return \Illuminate\Contracts\Auth\Authenticatable|null
*/
public function retrieveByCredentials(array $credentials)
public function retrieveByCredentials(#[\SensitiveParameter] array $credentials): ?Authenticatable
{
if (empty($credentials)) {
return;
return null;
}

// First we will add each credential element to the query as a where clause.
Expand Down
Loading