-
Notifications
You must be signed in to change notification settings - Fork 0
Implemented initial PHP classes for time value objects, including Instant and Timezone. #1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| /tests export-ignore | ||
| /vendor export-ignore | ||
|
|
||
| /README.md export-ignore | ||
| /LICENSE export-ignore | ||
| /Makefile export-ignore | ||
| /phpunit.xml export-ignore | ||
| /phpstan.neon.dist export-ignore | ||
| /infection.json.dist export-ignore | ||
|
|
||
| /.github export-ignore | ||
| /.gitignore export-ignore | ||
| /.gitattributes export-ignore |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| version: 2 | ||
|
|
||
| updates: | ||
| - package-ecosystem: "composer" | ||
| directory: "/" | ||
| schedule: | ||
| interval: "weekly" | ||
| open-pull-requests-limit: 0 | ||
| labels: | ||
| - "php" | ||
| - "security" | ||
| - "dependencies" | ||
| groups: | ||
| php-security: | ||
| applies-to: security-updates | ||
| patterns: | ||
| - "*" | ||
|
|
||
| - package-ecosystem: "github-actions" | ||
| directory: "/" | ||
| schedule: | ||
| interval: "weekly" | ||
| commit-message: | ||
| prefix: "build" | ||
| labels: | ||
| - "dependencies" | ||
| - "github-actions" | ||
| groups: | ||
| github-actions: | ||
| patterns: | ||
| - "*" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,25 @@ | ||
| name: Auto assign issues and pull requests | ||
|
|
||
| on: | ||
| issues: | ||
| types: | ||
| - opened | ||
| pull_request: | ||
| types: | ||
| - opened | ||
|
|
||
| jobs: | ||
| run: | ||
| runs-on: ubuntu-latest | ||
| permissions: | ||
| issues: write | ||
| pull-requests: write | ||
| steps: | ||
| - name: Assign issues and pull requests | ||
| uses: gustavofreze/auto-assign@2.1.0 | ||
| with: | ||
| assignees: '${{ vars.ASSIGNEES }}' | ||
| github_token: '${{ secrets.GITHUB_TOKEN }}' | ||
| allow_self_assign: 'true' | ||
| allow_no_assignees: 'true' | ||
| assignment_options: 'ISSUE,PULL_REQUEST' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,87 @@ | ||
| name: CI | ||
|
|
||
| on: | ||
| pull_request: | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| env: | ||
| PHP_VERSION: '8.5' | ||
|
|
||
| jobs: | ||
| build: | ||
| name: Build | ||
| runs-on: ubuntu-latest | ||
|
|
||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v6 | ||
|
|
||
| - name: Configure PHP | ||
| uses: shivammathur/setup-php@v2 | ||
| with: | ||
| php-version: ${{ env.PHP_VERSION }} | ||
| tools: composer:2 | ||
|
|
||
| - name: Validate composer.json | ||
| run: composer validate --no-interaction | ||
|
|
||
| - name: Install dependencies | ||
| run: composer install --no-progress --optimize-autoloader --prefer-dist --no-interaction | ||
|
|
||
| - name: Upload vendor and composer.lock as artifact | ||
| uses: actions/upload-artifact@v6 | ||
| with: | ||
| name: vendor-artifact | ||
| path: | | ||
| vendor | ||
| composer.lock | ||
|
|
||
| auto-review: | ||
| name: Auto review | ||
| runs-on: ubuntu-latest | ||
| needs: build | ||
|
|
||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v6 | ||
|
|
||
| - name: Configure PHP | ||
| uses: shivammathur/setup-php@v2 | ||
| with: | ||
| php-version: ${{ env.PHP_VERSION }} | ||
| tools: composer:2 | ||
|
|
||
| - name: Download vendor artifact from build | ||
| uses: actions/download-artifact@v7 | ||
| with: | ||
| name: vendor-artifact | ||
| path: . | ||
|
|
||
| - name: Run review | ||
| run: composer review | ||
|
|
||
| tests: | ||
| name: Tests | ||
| runs-on: ubuntu-latest | ||
| needs: auto-review | ||
|
|
||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v6 | ||
|
|
||
| - name: Configure PHP | ||
| uses: shivammathur/setup-php@v2 | ||
| with: | ||
| php-version: ${{ env.PHP_VERSION }} | ||
| tools: composer:2 | ||
|
|
||
| - name: Download vendor artifact from build | ||
| uses: actions/download-artifact@v7 | ||
| with: | ||
| name: vendor-artifact | ||
| path: . | ||
|
|
||
| - name: Run tests | ||
| run: composer tests | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,35 @@ | ||
| name: Security checks | ||
|
|
||
| on: | ||
| push: | ||
| branches: [ "main" ] | ||
| pull_request: | ||
| branches: [ "main" ] | ||
| schedule: | ||
| - cron: "0 0 * * *" | ||
|
|
||
| permissions: | ||
| actions: read | ||
| contents: read | ||
| security-events: write | ||
|
|
||
| jobs: | ||
| analyze: | ||
| name: Analyze | ||
| runs-on: ubuntu-latest | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| language: [ "actions" ] | ||
|
|
||
| steps: | ||
| - name: Checkout repository | ||
| uses: actions/checkout@v6 | ||
|
|
||
| - name: Initialize CodeQL | ||
| uses: github/codeql-action/init@v4 | ||
| with: | ||
| languages: ${{ matrix.language }} | ||
|
|
||
gustavofreze marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| - name: Perform CodeQL analysis | ||
| uses: github/codeql-action/analyze@v4 | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| .idea | ||
|
|
||
| vendor | ||
| report | ||
| .phpunit.* | ||
|
|
||
| *.lock |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,68 @@ | ||
| PWD := $(CURDIR) | ||
| ARCH := $(shell uname -m) | ||
| PLATFORM := | ||
|
|
||
| ifeq ($(ARCH),arm64) | ||
| PLATFORM := --platform=linux/amd64 | ||
| endif | ||
|
|
||
| DOCKER_RUN = docker run ${PLATFORM} --rm -it --net=host -v ${PWD}:/app -w /app gustavofreze/php:8.5-alpine | ||
gustavofreze marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| RESET := \033[0m | ||
| GREEN := \033[0;32m | ||
| YELLOW := \033[0;33m | ||
|
|
||
| .DEFAULT_GOAL := help | ||
|
|
||
| .PHONY: configure | ||
| configure: ## Configure development environment | ||
| @${DOCKER_RUN} composer update --optimize-autoloader | ||
|
|
||
| .PHONY: test | ||
| test: ## Run all tests with coverage | ||
| @${DOCKER_RUN} composer tests | ||
|
|
||
| .PHONY: test-file | ||
| test-file: ## Run tests for a specific file (usage: make test-file FILE=path/to/file) | ||
| @${DOCKER_RUN} composer test-file ${FILE} | ||
|
|
||
| .PHONY: test-no-coverage | ||
| test-no-coverage: ## Run all tests without coverage | ||
| @${DOCKER_RUN} composer tests-no-coverage | ||
|
|
||
| .PHONY: review | ||
| review: ## Run static code analysis | ||
| @${DOCKER_RUN} composer review | ||
|
|
||
| .PHONY: show-reports | ||
| show-reports: ## Open static analysis reports (e.g., coverage, lints) in the browser | ||
| @sensible-browser report/coverage/coverage-html/index.html report/coverage/mutation-report.html | ||
|
|
||
| .PHONY: clean | ||
| clean: ## Remove dependencies and generated artifacts | ||
| @sudo chown -R ${USER}:${USER} ${PWD} | ||
| @rm -rf report vendor .phpunit.cache *.lock | ||
|
|
||
| .PHONY: help | ||
| help: ## Display this help message | ||
| @echo "Usage: make [target]" | ||
| @echo "" | ||
| @echo "$$(printf '$(GREEN)')Setup$$(printf '$(RESET)')" | ||
| @grep -E '^(configure):.*?## .*$$' $(MAKEFILE_LIST) \ | ||
| | awk 'BEGIN {FS = ":.*? ## "}; {printf "$(YELLOW)%-25s$(RESET) %s\n", $$1, $$2}' | ||
| @echo "" | ||
| @echo "$$(printf '$(GREEN)')Testing$$(printf '$(RESET)')" | ||
| @grep -E '^(test|test-file|test-no-coverage):.*?## .*$$' $(MAKEFILE_LIST) \ | ||
| | awk 'BEGIN {FS = ":.*?## "}; {printf "$(YELLOW)%-25s$(RESET) %s\n", $$1, $$2}' | ||
| @echo "" | ||
| @echo "$$(printf '$(GREEN)')Quality$$(printf '$(RESET)')" | ||
| @grep -E '^(review):.*?## .*$$' $(MAKEFILE_LIST) \ | ||
| | awk 'BEGIN {FS = ":.*?## "}; {printf "$(YELLOW)%-25s$(RESET) %s\n", $$1, $$2}' | ||
| @echo "" | ||
| @echo "$$(printf '$(GREEN)')Reports$$(printf '$(RESET)')" | ||
| @grep -E '^(show-reports):.*?## .*$$' $(MAKEFILE_LIST) \ | ||
| | awk 'BEGIN {FS = ":.*?## "}; {printf "$(YELLOW)%-25s$(RESET) %s\n", $$1, $$2}' | ||
| @echo "" | ||
| @echo "$$(printf '$(GREEN)')Cleanup$$(printf '$(RESET)')" | ||
| @grep -E '^(clean):.*?## .*$$' $(MAKEFILE_LIST) \ | ||
| | awk 'BEGIN {FS = ":.*?## "}; {printf "$(YELLOW)%-25s$(RESET) %s\n", $$1, $$2}' | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.