Skip to content

Commit efb4d0d

Browse files
committed
1.0
1 parent 6370cfa commit efb4d0d

34 files changed

Lines changed: 198 additions & 460 deletions

.github/workflows/ci.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,19 @@ name: CI
22

33
on:
44
push:
5-
branches: [ "main", "develop" ]
5+
branches: ["main", "develop"]
66
pull_request:
7-
branches: [ "main" ]
7+
branches: ["main"]
88

99
jobs:
1010
test:
1111
runs-on: ubuntu-latest
1212
strategy:
1313
matrix:
14-
php: ['8.1', '8.2', '8.3', '8.4']
15-
14+
php: ["8.1", "8.2", "8.3", "8.4"]
15+
1616
name: PHP ${{ matrix.php }} Tests
17-
17+
1818
steps:
1919
- name: Checkout code
2020
uses: actions/checkout@v4

.github/workflows/release-plz.yml

Lines changed: 23 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1-
name: Release
1+
name: Release-plz
22

33
permissions:
4+
pull-requests: write
45
contents: write
56

67
on:
@@ -9,8 +10,8 @@ on:
910
- main
1011

1112
jobs:
12-
release:
13-
name: Release PHP Package
13+
release-plz-release:
14+
name: Release-plz release
1415
runs-on: ubuntu-latest
1516
permissions:
1617
contents: write
@@ -19,38 +20,25 @@ jobs:
1920
uses: actions/checkout@v4
2021
with:
2122
fetch-depth: 0
22-
23-
- name: Setup PHP
24-
uses: shivammathur/setup-php@v2
23+
- name: Install Rust toolchain
24+
uses: dtolnay/rust-toolchain@stable
25+
- name: Sync Cargo.lock
26+
run: cargo check
27+
- name: Commit Cargo.lock if changed
28+
run: |
29+
if git diff --quiet Cargo.lock; then
30+
echo "Cargo.lock is already up to date"
31+
else
32+
git config user.name "github-actions[bot]"
33+
git config user.email "github-actions[bot]@users.noreply.github.com"
34+
git add Cargo.lock
35+
git commit -m "chore: update Cargo.lock"
36+
git push
37+
fi
38+
- name: Run release-plz
39+
uses: release-plz/action@v0.5
2540
with:
26-
php-version: '8.1'
27-
extensions: mbstring, xml, curl, zip, json
28-
tools: composer
29-
30-
- name: Install dependencies
31-
run: composer install --no-dev --optimize-autoloader
32-
33-
- name: Run tests
34-
run: composer test
35-
36-
- name: Run static analysis
37-
run: composer phpstan
38-
39-
- name: Check code style
40-
run: composer cs
41-
42-
- name: Create release
43-
id: create_release
44-
uses: actions/create-release@v1
41+
command: release
4542
env:
4643
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
47-
with:
48-
tag_name: v${{ github.run_number }}
49-
release_name: Release v${{ github.run_number }}
50-
draft: false
51-
prerelease: false
52-
53-
- name: Publish to Packagist
54-
# This would require Packagist webhook or manual submission
55-
# For now, we'll just create the GitHub release
56-
run: echo "Package published to GitHub. Submit to Packagist manually or configure webhook."
44+
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}

.github/workflows/release.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ jobs:
1414
runs-on: ubuntu-latest
1515
strategy:
1616
matrix:
17-
php: ['8.1', '8.2', '8.3', '8.4']
18-
17+
php: ["8.1", "8.2", "8.3", "8.4"]
18+
1919
name: PHP ${{ matrix.php }} Tests
20-
20+
2121
steps:
2222
- name: Checkout code
2323
uses: actions/checkout@v4
@@ -52,7 +52,7 @@ jobs:
5252
needs: test
5353
runs-on: ubuntu-latest
5454
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
55-
55+
5656
steps:
5757
- name: Checkout code
5858
uses: actions/checkout@v4
@@ -62,7 +62,7 @@ jobs:
6262
- name: Setup PHP
6363
uses: shivammathur/setup-php@v2
6464
with:
65-
php-version: '8.3'
65+
php-version: "8.3"
6666
extensions: json, mbstring, zip
6767
tools: composer
6868

@@ -75,7 +75,7 @@ jobs:
7575
# Get current version from composer.json
7676
CURRENT_VERSION=$(php -r "echo json_decode(file_get_contents('composer.json'))->version ?? 'unknown';")
7777
echo "current_version=$CURRENT_VERSION" >> $GITHUB_OUTPUT
78-
78+
7979
# Check if this version already has a git tag
8080
if git tag -l "v$CURRENT_VERSION" | grep -q "v$CURRENT_VERSION"; then
8181
echo "should_release=false" >> $GITHUB_OUTPUT
@@ -105,7 +105,7 @@ jobs:
105105
needs: release
106106
runs-on: ubuntu-latest
107107
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
108-
108+
109109
steps:
110110
- name: Checkout code
111111
uses: actions/checkout@v4

CHANGELOG.md

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +0,0 @@
1-
# Changelog
2-
3-
All notable changes to this project will be documented in this file.
4-
5-
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6-
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7-
8-
## [Unreleased]
9-
10-
## [1.0.0] - 2025-06-27
11-
12-
### Added
13-
- Initial release of LogDash PHP SDK
14-
- Logger with multiple log levels (error, warn, info, http, verbose, debug, silly)
15-
- Metrics API with set and mutate operations
16-
- HTTP synchronization for logs and metrics
17-
- Support for local-only logging when no API key is provided
18-
- Colored console output for improved debugging
19-
- Non-blocking error handling for production environments
20-
- PSR-4 autoloading support
21-
- Comprehensive documentation and examples
22-
23-
### Features
24-
- Zero-configuration setup
25-
- Real-time cloud synchronization
26-
- Framework-agnostic design
27-
- PHP 8.1+ compatibility
28-
- Guzzle HTTP client integration
29-
- PHPUnit test suite
30-
- PHPStan static analysis
31-
- PHP CodeSniffer integration

Dockerfile

Lines changed: 0 additions & 29 deletions
This file was deleted.

LICENSE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2025 LogDash
3+
Copyright (c) 2025 Logdash
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

Makefile

Lines changed: 0 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -1,60 +0,0 @@
1-
.PHONY: help install test examples docker-build docker-test docker-examples clean
2-
3-
help: ## Show this help message
4-
@echo 'Usage: make [target]'
5-
@echo ''
6-
@echo 'Targets:'
7-
@awk 'BEGIN {FS = ":.*?## "} /^[a-zA-Z_-]+:.*?## / {printf " %-15s %s\n", $$1, $$2}' $(MAKEFILE_LIST)
8-
9-
install: ## Install dependencies
10-
composer install
11-
12-
test: ## Run tests
13-
php test.php
14-
@if command -v vendor/bin/phpunit >/dev/null 2>&1; then \
15-
vendor/bin/phpunit; \
16-
else \
17-
echo "PHPUnit not available, run 'make install' first"; \
18-
fi
19-
20-
examples: ## Run examples
21-
php examples.php
22-
23-
phpstan: ## Run PHPStan static analysis
24-
@if command -v vendor/bin/phpstan >/dev/null 2>&1; then \
25-
vendor/bin/phpstan analyse; \
26-
else \
27-
echo "PHPStan not available, run 'make install' first"; \
28-
fi
29-
30-
cs: ## Check code style
31-
@if command -v vendor/bin/phpcs >/dev/null 2>&1; then \
32-
vendor/bin/phpcs; \
33-
else \
34-
echo "PHP CodeSniffer not available, run 'make install' first"; \
35-
fi
36-
37-
cbf: ## Fix code style
38-
@if command -v vendor/bin/phpcbf >/dev/null 2>&1; then \
39-
vendor/bin/phpcbf; \
40-
else \
41-
echo "PHP Code Beautifier not available, run 'make install' first"; \
42-
fi
43-
44-
docker-build: ## Build Docker image
45-
docker-compose build
46-
47-
docker-test: ## Run tests in Docker
48-
docker-compose run --rm php-test
49-
50-
docker-examples: ## Run examples in Docker
51-
docker-compose run --rm php-sdk
52-
53-
docker-dev: ## Start development environment
54-
docker-compose run --rm php-dev
55-
56-
clean: ## Clean up generated files
57-
rm -rf vendor/
58-
rm -f composer.lock
59-
rm -rf .phpunit.cache
60-
docker-compose down --rmi all --volumes --remove-orphans 2>/dev/null || true

0 commit comments

Comments
 (0)