Skip to content
Open

8.x #38

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
84 commits
Select commit Hold shift + click to select a range
160604b
First commit
Ang3 Jan 22, 2022
92aafa3
Merge branch 'master' of https://github.com/Ang3/php-odoo-api-client …
Ang3 Jan 22, 2022
3600c54
Create composer.lock
Ang3 Jan 22, 2022
20a4a5e
Fix JSON calls
Ang3 Jan 22, 2022
7f3180d
Fixed execute_kw calls
Ang3 Jan 22, 2022
1d7943a
Delete DBAL features
Ang3 Jan 22, 2022
3280831
composer update
Ang3 Jan 22, 2022
b1e1b3c
Delete useless files
Ang3 Jan 22, 2022
c189f60
Transport implementation - PhpNativeStreamTransport
Ang3 Jan 22, 2022
b3ee87b
Renamed JSON-RPC PHP stream transport
Ang3 Jan 22, 2022
917b289
Create UPGRADE-8.0.md
Ang3 Jan 22, 2022
f10fdb9
Factorized RPC data normalization
Ang3 Jan 22, 2022
c7c292c
Update AbstractRpcTransport.php
Ang3 Jan 22, 2022
dea0762
Deleted connection setter
Ang3 Jan 23, 2022
dc1d648
Fixed code
Ang3 Jan 23, 2022
006cf63
Deleted debug dumps
Ang3 Jan 23, 2022
425e739
Create index.rst
Ang3 Jan 23, 2022
9958973
Update index.rst
Ang3 Jan 23, 2022
f6f520b
Update index.md
Ang3 Jan 23, 2022
7ff0718
Update index.md
Ang3 Jan 23, 2022
22674ac
Update index.md
Ang3 Jan 23, 2022
e6945cd
readthedocs config files
Ang3 Jan 23, 2022
7a1fbd9
Update mkdocs.yaml
Ang3 Jan 23, 2022
f32cda0
Update mkdocs.yaml
Ang3 Jan 23, 2022
7065766
Update .readthedocs.yaml
Ang3 Jan 23, 2022
939cf59
Update docs
Ang3 Jan 23, 2022
bb525fd
Update expression_builder.md
Ang3 Jan 23, 2022
e0e97dd
Update index.md
Ang3 Jan 23, 2022
0792ede
Fixed code
Ang3 May 7, 2022
a54fd38
Updated client logging
Ang3 May 22, 2022
3ad8d99
Fixed client logging
Ang3 May 22, 2022
3a259f4
Update Client.php
Ang3 May 22, 2022
00fe445
Update Client.php
Ang3 May 22, 2022
4a4cadc
Code review
Ang3 Feb 2, 2023
ecfdb78
DBAL feature
Ang3 Feb 2, 2023
c4cae45
Update README.md
Ang3 Feb 2, 2023
b0fecdd
Update README.md
Ang3 Feb 2, 2023
f4ac668
Update README.md
Ang3 Feb 2, 2023
de0a4a0
Update UPGRADE-8.0.md
Ang3 Feb 2, 2023
7461e5f
Updated docs
Ang3 Feb 2, 2023
7419d60
Fixed code
Ang3 Feb 2, 2023
cade159
Fixed tests code
Ang3 Feb 2, 2023
3ba83ee
Update README.md
Ang3 Feb 2, 2023
f558a5b
Update Schema.php
Ang3 Feb 2, 2023
4bcefb3
Fix update
Ang3 Nov 5, 2023
b7fbfea
Removed DBAL features
Ang3 Nov 6, 2023
72b9282
Create ClientTest.php
Ang3 Nov 6, 2023
9f10461
Update README.md
Ang3 Nov 6, 2023
693adfc
Update README.md
Ang3 Nov 6, 2023
0a5732e
Update README.md
Ang3 Nov 6, 2023
af5a80c
Update php_lint.yml
Ang3 Nov 6, 2023
002bd1c
Fix PHP code via php-cs-fixer (auto) [no ci]
Ang3 Nov 6, 2023
ef6a026
Client tests
Ang3 Nov 6, 2023
e5ada2e
JSONRPC transport tests
Ang3 Nov 6, 2023
2dd0b7d
Fix PHP code via php-cs-fixer (auto) [no ci]
Ang3 Nov 6, 2023
34a9448
Update README.md
Ang3 Nov 6, 2023
07f2cfd
Update README.md
Ang3 Nov 6, 2023
d5e01f7
Update README.md
Ang3 Nov 6, 2023
7fd211f
Update README.md
Ang3 Nov 6, 2023
52c2f83
Update README.md
Ang3 Nov 6, 2023
f80545f
Fix code in /tests
Ang3 Nov 6, 2023
df8c8a1
Fix PHP code via php-cs-fixer (auto) [no ci]
Ang3 Nov 6, 2023
2d059c6
Update JsonRpcPhpStreamTransportTest.php
Ang3 Nov 6, 2023
de12143
Merge branch '8.x' of https://github.com/Ang3/php-odoo-api-client int…
Ang3 Nov 6, 2023
eaadf34
Renamed Odoo RPC enums
Ang3 Nov 6, 2023
c336ed1
Fix PHP code via php-cs-fixer (auto) [no ci]
Ang3 Nov 6, 2023
7f0900a
Update docs
Ang3 Nov 7, 2023
98f1c4a
Implemented connection DSN
Ang3 Nov 21, 2023
963f071
Fix PHP code via php-cs-fixer (auto) [no ci]
Ang3 Nov 21, 2023
d52b348
Fix code
Ang3 Nov 21, 2023
1f6ee17
Update README.md
Ang3 Nov 21, 2023
cd988e5
Merge branch '8.x' of https://github.com/Ang3/php-odoo-api-client int…
Ang3 Nov 21, 2023
871d46e
Update README.md
Ang3 Nov 21, 2023
64feccf
Update UPGRADE-8.0.md
Ang3 Nov 21, 2023
27ca11f
Implemented connection scheme parameter
Ang3 Nov 21, 2023
c3621c9
Update README.md
Ang3 Nov 21, 2023
1656305
Fix PHP code via php-cs-fixer (auto) [no ci]
Ang3 Nov 21, 2023
325119d
Fix tests
Ang3 Jan 16, 2026
161c953
Fix client and connection
Ang3 Feb 3, 2026
2ea6fb5
Removes phpunit cache folder
Ang3 Feb 3, 2026
8b21b6d
Updates github ci
Ang3 Feb 3, 2026
8900c6a
Updates composer dependencies
Ang3 Feb 3, 2026
ba48efb
Updates github ci
Ang3 Feb 3, 2026
0f7f96f
Merged master
Ang3 Feb 3, 2026
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
34 changes: 34 additions & 0 deletions .github/workflows/php_lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: PHP Linting

on:
push:
branches-ignore:
- 'master'
- 'main'
pull_request:
branches-ignore:
- 'master'
- 'main'

jobs:
php-cs-fixer:
name: PHP-CS-Fixer
runs-on: ubuntu-latest
steps:
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.2'
- name: Install PHP-CS-Fixer
run: |
wget https://cs.symfony.com/download/php-cs-fixer-v3.phar -O php-cs-fixer
sudo chmod a+x php-cs-fixer
sudo mv php-cs-fixer /usr/local/bin/php-cs-fixer
- name: Checkout source code
uses: actions/checkout@master
- name: Run PHP-CS-Fixer - Fix
run: php-cs-fixer fix src -vvv --diff --config=.php-cs-fixer.php-highest.php
- name: Commit changes
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: Fix PHP code via php-cs-fixer (auto) [no ci]
32 changes: 32 additions & 0 deletions .github/workflows/phpunit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: PHPUnit tests

on: [push, pull_request]

permissions:
contents: read

jobs:
tests_suite:
strategy:
matrix:
php_version: [ '8.2', '8.3', '8.4', '8.5' ]
runs-on: ubuntu-latest
steps:
- uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php_version }}
extensions: json
- uses: actions/checkout@v3
- name: Cache Composer packages
id: composer-cache
uses: actions/cache@v3
with:
path: vendor
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-php-
- name: Install Dependencies
run: |
composer install
- name: Execute PHPUnit tests
run: vendor/bin/phpunit
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
/.phpunit.cache/
/vendor/
/.idea/
/var/
.php_cs.cache
.php_cs-fixer.cache
.php-cs-fixer.cache
.phpunit.result.cache
test.php
1 change: 0 additions & 1 deletion .php-cs-fixer.cache

This file was deleted.

60 changes: 60 additions & 0 deletions .php-cs-fixer.dist.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
<?php

declare(strict_types=1);

$header = <<<'EOF'
This file is part of package ang3/php-odoo-api-client

This source file is subject to the MIT license that is bundled
with this source code in the file LICENSE.
EOF;

$finder = PhpCsFixer\Finder::create()
->ignoreDotFiles(false)
->ignoreVCSIgnored(true)
->exclude('tests/Fixtures')
->in(__DIR__)
->append([
__DIR__.'/dev-tools/doc.php',
// __DIR__.'/php-cs-fixer', disabled, as we want to be able to run bootstrap file even on lower PHP version, to show nice message
])
;

$config = new PhpCsFixer\Config();
$config
->setRiskyAllowed(true)
->setRules([
'@PHP74Migration' => true,
'@PHP74Migration:risky' => true,
'@PHPUnit100Migration:risky' => true,
'@PhpCsFixer' => true,
'@PhpCsFixer:risky' => true,
'@Symfony' => true,
'general_phpdoc_annotation_remove' => ['annotations' => ['expectedDeprecation']], // one should use PHPUnit built-in method instead
'header_comment' => ['header' => $header],
'heredoc_indentation' => false, // TODO switch on when # of PR's is lower
'modernize_strpos' => true, // needs PHP 8+ or polyfill
'no_useless_concat_operator' => false, // TODO switch back on when the `src/Console/Application.php` no longer needs the concat
'use_arrow_functions' => false, // TODO switch on when # of PR's is lower
])
->setFinder($finder)
;

// special handling of fabbot.io service if it's using too old PHP CS Fixer version
if (false !== getenv('FABBOT_IO')) {
try {
PhpCsFixer\FixerFactory::create()
->registerBuiltInFixers()
->registerCustomFixers($config->getCustomFixers())
->useRuleSet(new PhpCsFixer\RuleSet($config->getRules()))
;
} catch (PhpCsFixer\ConfigurationException\InvalidConfigurationException $e) {
$config->setRules([]);
} catch (UnexpectedValueException $e) {
$config->setRules([]);
} catch (InvalidArgumentException $e) {
$config->setRules([]);
}
}

return $config;
20 changes: 20 additions & 0 deletions .php-cs-fixer.php-highest.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<?php

declare(strict_types=1);

if (PHP_VERSION_ID < 80100 || PHP_VERSION_ID >= 80200) {
fwrite(STDERR, "PHP CS Fixer's config for PHP-HIGHEST can be executed only on highest supported PHP version - 8.1.*.\n");
fwrite(STDERR, "Running it on lower PHP version would prevent calling migration rules.\n");

exit(1);
}

$config = require __DIR__.'/.php-cs-fixer.dist.php';

$config->setRules(array_merge($config->getRules(), [
'@PHP81Migration' => true,
'@PHP80Migration:risky' => true,
'heredoc_indentation' => false,
]));

return $config;
14 changes: 14 additions & 0 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# .readthedocs.yaml
# Read the Docs configuration file
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details

# Required
version: 2

build:
os: ubuntu-20.04
tools:
python: "3.9"

mkdocs:
configuration: mkdocs.yaml
13 changes: 0 additions & 13 deletions .travis.yml

This file was deleted.

7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
CHANGELOG
=========

8.0
---

* Support for PHP >= 8.1 only - The PHP extension `php-xmlrpc` is not used anymore.
* Transport layer - XMLRPC replaced by JSONRPC.
* Code review

7.0
---

Expand Down
32 changes: 32 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
FROM php:8.2-cli-alpine

# Install system packages for compilation
RUN apk add --no-cache \
bash \
git \
unzip \
curl \
autoconf \
make \
gcc \
g++ \
musl-dev \
icu-dev \
zlib-dev \
libzip-dev \
oniguruma-dev \
linux-headers

# Install PHP extensions
RUN docker-php-ext-install intl zip

# Install PCOV
RUN pecl install pcov \
&& docker-php-ext-enable pcov \
&& echo "pcov.enabled=1" >> /usr/local/etc/php/conf.d/pcov.ini \
&& echo "pcov.directory=/app/src" >> /usr/local/etc/php/conf.d/pcov.ini

# Install Composer
COPY --from=composer:2 /usr/bin/composer /usr/bin/composer

WORKDIR /app
27 changes: 27 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
SHELL := /bin/bash

DC := docker compose
SERVICE := php

.DEFAULT_GOAL := help

.PHONY: help build up down bin logs

help:
@echo "Targets:"
@echo " build Build image"
@echo " up Launch the container"
@echo " down Stop and delete the container"
@echo " logs Display logs"

build:
$(DC) build

up:
$(DC) up -d

down:
$(DC) down --remove-orphans

logs:
$(DC) logs -f $(SERVICE)
Loading
Loading