Skip to content
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

Implement dtos #4

Merged
merged 13 commits into from
May 6, 2024
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
8 changes: 6 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,12 @@ jobs:

- name: Run tests suite
run: |
php ./vendor/bin/phpunit --coverage-clover=coverage.xml --coverage-xml=logs/coverage --log-junit=logs/coverage.junit.xml -d --min-coverage=100
php ./vendor/bin/phpunit --coverage-clover=coverage.xml --coverage-xml=logs/coverage --log-junit=logs/coverage.junit.xml

- name: Ensure every line is covered by tests
run: |
php tests/phpunit-coverage.php 96

- name: Run infection mutation testing
run:
php ./vendor/bin/infection --min-msi=85 --min-covered-msi=90 --threads=max --no-interaction --logger-github=true --skip-initial-tests --coverage=logs
php ./vendor/bin/infection --min-msi=85 --min-covered-msi=90 --only-covered --threads=max --no-interaction --logger-github=true --skip-initial-tests --coverage=logs
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2024 Globy
Copyright (c) 2024 GlobyApp

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
12 changes: 8 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ Parse OData v4 query strings, outputs proper PHP objects.
- [Examples](#examples)
- [API](#api)
- [Known issues](#known-issues)
- [Thanks](#thanks)

## About

Expand All @@ -29,7 +30,7 @@ As I did not see a package exclusively dealing with parsing the query strings, a

## Requirements

- PHP >= 8.1.0
- PHP >= 8.2.0
- [Composer](https://getcomposer.org/)

## Installation
Expand All @@ -42,9 +43,6 @@ composer require globyapp/odata-query-parser

## Examples

- [1. Use \$select to filter on some fields](#1-use-select-to-filter-on-some-fields)
- [2. Use non dollar syntax](#2-use-non-dollar-syntax)

### 1. Use \$select to filter on some fields

In this example, we will use the `$select` OData query string command to filter the fields returned by our API.
Expand Down Expand Up @@ -141,3 +139,9 @@ Filter = [
## Known issues

- `$filter` command will not parse `or` and functions (like `contains()` of `substringof`), because I did not focus on this for the moment (the parser for `$filter` is too simplistic, I should find a way to create an AST).

## Thanks
Feel free to open any issues or PRs.

---
MIT © 2024
8 changes: 5 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,12 @@
],
"minimum-stability": "stable",
"require": {
"php": ">=8.2"
"php": ">=8.2",
"ext-mbstring": "*"
},
"autoload": {
"psr-4": {
"GlobyApp\\": "src/"
"GlobyApp\\OdataQueryParser\\": "src/"
}
},
"require-dev": {
Expand All @@ -28,7 +29,8 @@
"phpstan/phpstan": "^1.10",
"phpstan/phpstan-deprecation-rules": "^1.1",
"vimeo/psalm": "^5.23",
"infection/infection": "^0.27.11"
"infection/infection": "^0.27.11",
"ext-simplexml": "*"
},
"autoload-dev": {
"psr-4": {
Expand Down
81 changes: 45 additions & 36 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading