Skip to content

Commit

Permalink
Local development script, v1.5.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Rudi Theunissen committed Jan 20, 2024
1 parent e1d27d3 commit 9b4d6f4
Show file tree
Hide file tree
Showing 9 changed files with 41 additions and 19 deletions.
8 changes: 4 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
language: php

php:
- 7.0
- 7.1
- 7.2
- 7.3
- 7.4
- 8.0
- 8.1
- 8.2
- 8.3
- nightly

env:
Expand Down
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
All notable changes to this project will be documented in this file.
This project follows [Semantic Versioning](http://semver.org/).

## [1.5.0] - 2023-01-19
- Fix object handlers to support PHP 8.3 (thank you @Majkl578)

## [1.4.0] - 2021-02-16
- Added support for PHP 8 (thank you @zlodes)
- Added support for mpdecimal 2.5+ #48
Expand Down
7 changes: 7 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
FROM php:8.3-alpine

RUN apk add --no-cache -X http://dl-cdn.alpinelinux.org/alpine/edge/main mpdecimal-dev

RUN apk add --no-cache $PHPIZE_DEPS valgrind

COPY --from=composer:latest /usr/bin/composer /usr/local/bin/composer
12 changes: 7 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,16 @@
# PHP Decimal Extension

[![Build Status](https://travis-ci.org/php-decimal/ext-decimal.svg?branch=master)](https://travis-ci.org/php-decimal/ext-decimal)
[![Build status](https://ci.appveyor.com/api/projects/status/lg5nw5tqgpmv1c33?svg=true)](https://ci.appveyor.com/project/rtheunissen/php-decimal)
[![PECL](https://img.shields.io/badge/PECL-1.4.0-blue.svg)](https://pecl.php.net/package/decimal)
[![PECL](https://img.shields.io/badge/PECL-1.5.0-blue.svg)](https://pecl.php.net/package/decimal)

Correctly-rounded, arbitrary-precision decimal arithmetic for PHP

## Documentation

See http://php-decimal.io
See https://php-decimal.github.io/

## Dependencies

- PHP 7
- PHP 7 or 8
- [mpdecimal](http://www.bytereef.org/mpdecimal/download.html)

## Install
Expand All @@ -27,6 +25,10 @@ Windows users can find *.dll* files under [releases](https://github.com/php-deci

You can do this temporarily using `php -dextension=decimal.so` or by adding `extension=decimal.so` to your INI. If you manage PHP with [phpbrew](https://github.com/phpbrew/phpbrew), you can use `phpbrew ext enable decimal`.

## Local development

Docker: `./develop.sh`

## Tests

```
Expand Down
3 changes: 3 additions & 0 deletions develop.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/usr/bin/env bash

docker-compose run --rm --build --interactive --tty dev /bin/sh
8 changes: 8 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
services:
dev:
build:
context: "."
volumes:
- ".:/ext-decimal"
- "./ext-decimal.ini:/usr/local/etc/php/conf.d/ext-decimal.ini"
working_dir: "/ext-decimal"
1 change: 1 addition & 0 deletions ext-decimal.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
extension=decimal.so
16 changes: 7 additions & 9 deletions package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,29 +2,27 @@
<package packagerversion="1.9.4" version="2.0" xmlns="http://pear.php.net/dtd/package-2.0" xmlns:tasks="http://pear.php.net/dtd/tasks-1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://pear.php.net/dtd/tasks-1.0 http://pear.php.net/dtd/tasks-1.0.xsd http://pear.php.net/dtd/package-2.0 http://pear.php.net/dtd/package-2.0.xsd">
<name>decimal</name>
<channel>pecl.php.net</channel>
<summary>Arbitrary precision floating-point decimal</summary>
<description>Adds support for correctly-rounded arbitrary precision decimal floating-point arithmetic in PHP 7</description>
<summary>Arbitrary precision decimal arithmetic</summary>
<description>Correctly-rounded arbitrary precision decimal floating-point arithmetic</description>
<lead>
<name>Rudi Theunissen</name>
<user>rtheunissen</user>
<email>[email protected]</email>
<active>yes</active>
</lead>
<date>2021-02-16</date>
<time>20:26:11</time>
<date>2024-01-19</date>
<time>21:24:10</time>
<version>
<release>1.4.0</release>
<api>1.4.0</api>
<release>1.5.0</release>
<api>1.5.0</api>
</version>
<stability>
<release>stable</release>
<api>stable</api>
</stability>
<license uri="https://opensource.org/licenses/MIT">MIT License</license>
<notes>
- Added support for PHP 8 (thank you @zlodes)
- Added support for mpdecimal 2.5+
- Fixed internal exception when passing negative decimal places to toFixed
- Fix object handlers for PHP 8.3 (thank you @Majkl578)
</notes>
<contents>
<dir name="/">
Expand Down
2 changes: 1 addition & 1 deletion php_decimal.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
#include "ext/spl/spl_exceptions.h"
#include "mpdecimal.h"

#define PHP_DECIMAL_VERSION "1.4.0"
#define PHP_DECIMAL_VERSION "1.5.0"

#define PHP_DECIMAL_EXTNAME "decimal"

Expand Down

0 comments on commit 9b4d6f4

Please sign in to comment.