Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion .github/workflows/license-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ jobs:
fail-fast: false
matrix:
php-version:
- "8.2"
- "8.3"
- "8.4"
dependencies: [ highest ]
operating-system: [ ubuntu-latest]

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/php-cs-fixer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ jobs:
fail-fast: false
matrix:
php-version:
- "8.2"
- "8.3"
- "8.4"
dependencies: [ highest ]
operating-system: [ ubuntu-latest]

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/phpstan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ jobs:
fail-fast: false
matrix:
php-version:
- "8.2"
- "8.3"
- "8.4"
dependencies: [ highest ]
operating-system: [ ubuntu-latest]

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/phpunit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ jobs:
fail-fast: false
matrix:
php-version:
- "8.2"
- "8.3"
- "8.4"
dependencies: [ highest ]
operating-system: [ ubuntu-latest, windows-2022]

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/rector.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ jobs:
fail-fast: false
matrix:
php-version:
- "8.2"
- "8.3"
- "8.4"
dependencies: [ highest ]
operating-system: [ ubuntu-latest]

Expand Down
16 changes: 15 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# b24-php-sdk change log

## 1.8.0 - 2025.11.01 (in progress)
## 1.8.0 - 2025.11.08

### Added

Expand Down Expand Up @@ -51,6 +51,20 @@
- `changeMobilePhone(?PhoneNumber $phoneNumber)` - removed second parameter `?bool $isMobilePhoneVerified`. Migration path: call `markMobilePhoneAsVerified()` separately after `changeMobilePhone()` if phone needs to be verified
- Replaced `getUserAgent()`, `getUserAgentReferer()`, `getUserAgentIp()` methods with single `getUserAgentInfo(): UserAgentInfo` method that returns complete user agent information object. Migration path: use `$info->userAgent`, `$info->referrer`, `$info->ip` properties instead
- Updated `RemoteEventsFactory::validate()` method signature from `validate(EventInterface $event, string $applicationToken)` to `validate(Bitrix24AccountInterface $bitrix24Account, EventInterface $event)`. Now uses `Bitrix24AccountInterface::isApplicationTokenValid()` for token validation instead of direct string comparison
- **Docker configuration updated to PHP 8.4** - Development environment now uses PHP 8.4.14 (docker/php-cli/Dockerfile):
- Upgraded from PHP 8.3 to PHP 8.4 base image (`php:8.4-cli-bookworm`)
- Updated Composer to version 2.8
- Added PHP extension installer v2.4 from mlocati for easier extension management
- Added new PHP extensions: `amqp`, `excimer`, `opcache`, `pcntl`, `yaml`, `zip`
- Changed base OS from Alpine to Debian Bookworm for better compatibility
- Implemented multi-stage Docker build for optimized image size
- Added proper user/group ID mapping for www-data user (UID/GID 10001)
- Set proper working directory ownership and non-root user execution
- **PHP 8.4 compatibility improvements**:
- Rector configuration updated to use `LevelSetList::UP_TO_PHP_84` for PHP 8.4 feature detection
- PHPUnit configuration updated to PHPUnit 11.0 attribute set (`PHPUnitSetList::PHPUNIT_110`)
- Fixed all implicitly nullable parameter deprecation warnings (8 occurrences)
- Fixed PHPStan internal errors with `random_int()` range handling


### Fixed
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
"monolog/monolog": "^3",
"nyholm/psr7": "^1.8",
"openai-php/client": "0.10.*",
"phpstan/phpstan": "1.11.7",
"phpstan/phpstan": "^1",
"phpunit/phpunit": "^10 || ^11|| ^12",
"rector/rector": "^1",
"roave/security-advisories": "dev-master",
Expand Down
64 changes: 45 additions & 19 deletions docker/php-cli/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,27 +1,53 @@
#FROM php:8.3-cli-alpine
#
#RUN apk add unzip libpq-dev git icu-dev \
# && docker-php-ext-install bcmath intl \
# && docker-php-ext-enable bcmath intl
# This file is part of the bitrix24-php-sdk package.
#
#RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/bin --filename=composer --quiet
# © Maksim Mesilov <mesilov.maxim@gmail.com>
#
#ENV COMPOSER_ALLOW_SUPERUSER 1
# For the full copyright and license information, please view the MIT-LICENSE.txt
# file that was distributed with this source code.
#

# Grab the PHP extension installer script from mlocati's image
# https://github.com/mlocati/docker-php-extension-installer#readme
FROM mlocati/php-extension-installer:2.4 AS php-extension-installer

# Separate Composer stage to install PHP dependencies efficiently
# https://hub.docker.com/_/composer
FROM composer:2.8 AS composer

# Using official PHP 8.3 CLI image based on Debian Bookworm for development purposes
FROM php:8.4-cli-bookworm AS dev-php

# Copy Composer binary from the official Composer image
COPY --from=composer /usr/bin/composer /usr/bin/composer
# Copy PHP extension installer script from mlocati's image
COPY --from=php-extension-installer /usr/bin/install-php-extensions /usr/bin/install-php-extensions

# Link to the source repository for this image (OCI standard label)
LABEL "org.opencontainers.image.source"="https://github.com/bitrix24/b24sdk-cli"

ARG UID=10001
ARG GID=10001

RUN <<EOF
groupmod --gid=${GID} www-data
usermod --uid=${UID} --gid=${GID} www-data
EOF

RUN <<EOF
apt-get update
apt-get install --no-install-recommends --no-install-suggests -q -y \
unzip
apt-get clean
rm -rf /var/lib/apt/lists/*
EOF

FROM php:8.3-cli-alpine
RUN install-php-extensions bcmath excimer intl pcntl opcache yaml zip

# Install system dependencies and PHP extensions
RUN apk add --no-cache unzip libpq-dev git icu-dev $PHPIZE_DEPS \
&& docker-php-ext-install bcmath intl \
&& docker-php-ext-enable bcmath intl
WORKDIR /var/www/html

# Install and enable Excimer extension
# https://www.mediawiki.org/wiki/Excimer
RUN pecl install excimer \
&& docker-php-ext-enable excimer
RUN chown www-data:www-data /var/www/html

# Install Composer
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/bin --filename=composer --quiet
USER www-data

# Set Composer environment variable
ENV COMPOSER_ALLOW_SUPERUSER 1
ENV COMPOSER_CACHE_DIR=/tmp/composer/cache
Loading