Skip to content
Open
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/ISSUE_TEMPLATE/bug.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@ body:
id: versions
attributes:
label: Versions
placeholder: "MODX 3.2.4, PHP 8.3, pdoTools 3.1.0"
placeholder: "MODX 3.2.4, PHP 8.3, pdoTools3 1.0.0"
validations:
required: true
6 changes: 3 additions & 3 deletions .github/workflows/phpunit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
strategy:
fail-fast: false
matrix:
php: ["8.1", "8.2", "8.3", "8.4"]
php: ["8.2", "8.3", "8.4", "8.5"]
steps:
- uses: actions/checkout@v5
- uses: shivammathur/setup-php@v2
Expand All @@ -31,7 +31,7 @@ jobs:
strategy:
fail-fast: false
matrix:
php: ["8.1", "8.2", "8.3", "8.4"]
php: ["8.2", "8.3", "8.4", "8.5"]
steps:
- uses: actions/checkout@v5
- uses: shivammathur/setup-php@v2
Expand All @@ -52,7 +52,7 @@ jobs:
strategy:
fail-fast: false
matrix:
php: ["8.1", "8.2", "8.3", "8.4"]
php: ["8.2", "8.3", "8.4", "8.5"]
services:
mysql:
image: mysql:8.0
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: "8.1"
php-version: "8.2"
extensions: pdo_mysql, mysqli, gd, zip, json, xml, mbstring, curl, tokenizer
coverage: none
tools: composer
Expand Down Expand Up @@ -123,12 +123,12 @@ jobs:
- name: Collect transport package
run: |
mkdir -p _packages
find modx/core/packages -name 'pdotools-*.transport.zip' -exec cp -t _packages {} +
find modx/core/packages -name 'pdotools3-*.transport.zip' -exec cp -t _packages {} +
ls -la _packages/
test -n "$(ls _packages/pdotools-*.transport.zip 2>/dev/null)"
test -n "$(ls _packages/pdotools3-*.transport.zip 2>/dev/null)"
python3 - <<'PY'
import glob, sys, zipfile
zpath = glob.glob('_packages/pdotools-*.transport.zip')[0]
zpath = glob.glob('_packages/pdotools3-*.transport.zip')[0]
# MODX 3 may serialize the FQN with single or double backslashes;
# older builds used underscores. Any of these means vehicles are present.
needles = (
Expand Down
10 changes: 6 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
## pdoTools
## pdoTools3

[![Tests](https://github.com/modx-pro/pdoTools3/actions/workflows/phpunit.yml/badge.svg)](https://github.com/modx-pro/pdoTools3/actions/workflows/phpunit.yml)
[![PHP](https://img.shields.io/badge/php-8.1%20%7C%208.2%20%7C%208.3%20%7C%208.4-777BB4)](https://github.com/modx-pro/pdoTools3/actions/workflows/phpunit.yml)
[![PHP](https://img.shields.io/badge/php-8.2%20%7C%208.3%20%7C%208.4%20%7C%208.5-777BB4)](https://github.com/modx-pro/pdoTools3/actions/workflows/phpunit.yml)
[![Coverage](https://img.shields.io/codecov/c/github/modx-pro/pdoTools3)](https://codecov.io/gh/modx-pro/pdoTools3)

pdoTools 3 is a set of everyday [MODX Revolution](https://modx.com/) 3 snippets plus a small library that keeps them fast. Queries are built with xPDO and run through PDO. Elements can live in the database or in files. [MiniShop3](https://github.com/modx-pro/MiniShop3) use it.
pdoTools3 is a set of everyday [MODX Revolution](https://modx.com/) 3 snippets plus a small library that keeps them fast. Queries are built with xPDO and run through PDO. Elements can live in the database or in files. [MiniShop3](https://github.com/modx-pro/MiniShop3) use it.

This branch requires **MODX 3** and **PHP 8.1+**. For MODX 2 use [pdoTools 2.x](https://github.com/modx-pro/pdoTools).
Requires **MODX 3** and **PHP 8.2+**. For MODX 2 use [pdoTools](https://github.com/modx-pro/pdoTools).

Package signature is `pdotools3` (transport `pdotools3-1.0.0-pl.transport.zip`). Component paths, snippets (`pdoResources`, …), and settings (`pdotools_*`) stay under `pdotools`. Sites on older `pdoTools` 3.x install this package over the same files, then remove the old package record in Package Manager.

**Documentation:** [docs.modx.pro/components/pdotools](https://docs.modx.pro/components/pdotools/)

Expand Down
6 changes: 4 additions & 2 deletions _build/build.config.php
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
<?php

const PKG_NAME = 'pdoTools';
const PKG_NAME = 'pdoTools3';
const PKG_NAME_LOWER = 'pdotools';
/** Transport package signature (zip name). Paths/settings stay PKG_NAME_LOWER. */
const PKG_SIGNATURE = 'pdotools3';

const PKG_VERSION = '3.1.0';
const PKG_VERSION = '1.0.0';
const PKG_RELEASE = 'pl';
const PKG_AUTO_INSTALL = false;

Expand Down
4 changes: 2 additions & 2 deletions _build/build.transport.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
unset($root);

/* override with your own defines here (see build.config.sample.php) */
require_once MODX_CORE_PATH . 'model/modx/modx.class.php';
require_once MODX_CORE_PATH . 'vendor/autoload.php';
require_once $sources['build'] . '/includes/functions.php';

$modx = new modX();
Expand All @@ -45,7 +45,7 @@
$modx->error = $modx->services->get('error');

$builder = new modPackageBuilder($modx);
$builder->createPackage(PKG_NAME_LOWER, PKG_VERSION, PKG_RELEASE);
$builder->createPackage(PKG_SIGNATURE, PKG_VERSION, PKG_RELEASE);
$builder->registerNamespace(PKG_NAME_LOWER, false, true, '{core_path}components/' . PKG_NAME_LOWER . '/');
$modx->log(modX::LOG_LEVEL_INFO, 'Created Transport Package and Namespace.');

Expand Down
4 changes: 2 additions & 2 deletions assets/components/pdotools/connector.php
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?php

require_once dirname(__FILE__, 4) . '/config.core.php';
require_once MODX_CORE_PATH . 'model/modx/modx.class.php';
$modx = new modX();
require_once MODX_CORE_PATH . 'vendor/autoload.php';
$modx = new MODX\Revolution\modX();
$modx->initialize('web');
$modx->services->add('error', new MODX\Revolution\Error\modError($modx));
$modx->error = $modx->services->get('error');
Expand Down
8 changes: 4 additions & 4 deletions core/components/pdotools/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,16 +29,16 @@
}
},
"require": {
"php": ">=8.1",
"fenom/fenom": "^2.11"
"php": ">=8.2",
"fenom/fenom": "^3.1"
},
"require-dev": {
"phpunit/phpunit": "^9.6",
"phpunit/phpunit": "^10.0",
"modx/revolution": "3.2.4-pl"
},
"config": {
"platform": {
"php": "8.1.31"
"php": "8.2.0"
},
"audit": {
"block-insecure": false,
Expand Down
Loading
Loading