Skip to content

Commit

Permalink
Release 4.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
khaperets authored Dec 24, 2020
1 parent 649e9da commit e4b2d71
Show file tree
Hide file tree
Showing 32 changed files with 299 additions and 550 deletions.
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
vendor/
composer.lock
/vendor
/composer.lock
24 changes: 17 additions & 7 deletions .scrutinizer.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,28 @@
filter:
excluded_paths:
- tests/*
- vendor/*
- Tests/*

checks:
php:
code_rating: true
duplication: true

build:
tests:
environment:
redis: false
docker: true

dependencies:
override:
-
command: ./vendor/bin/phpunit --coverage-clover ./clover.xml
coverage:
file: clover.xml
format: clover
- docker-compose up -d --remove-orphans --build
- docker-compose exec -T php /usr/local/bin/php /usr/local/bin/composer install

nodes:
coverage:
tests:
override:
- command: docker-compose run --rm -T php /usr/local/bin/php /app/vendor/bin/phpunit --coverage-clover=coverage.xml
coverage:
file: coverage.xml
format: clover
6 changes: 0 additions & 6 deletions .sensiolabs.yml

This file was deleted.

27 changes: 0 additions & 27 deletions .travis.yml

This file was deleted.

42 changes: 0 additions & 42 deletions DependencyInjection/Configuration.php

This file was deleted.

34 changes: 0 additions & 34 deletions DependencyInjection/JsonRequestExtension.php

This file was deleted.

10 changes: 10 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
FROM php:7.4-fpm-alpine

ENV COMPOSER_ALLOW_SUPERUSER 1

RUN apk add git build-base php7-dev && \
pecl -q install xdebug && \
docker-php-ext-enable xdebug && \
curl -s https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer

WORKDIR /app
13 changes: 0 additions & 13 deletions EventListener/RequestListenerInterface.php

This file was deleted.

58 changes: 0 additions & 58 deletions EventListener/RequestTransformerListener.php

This file was deleted.

2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2016-2017 Symfony Bundles (Dmitry Khaperets)
Copyright (c) 2016-2021 Dmitry Khaperets

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
11 changes: 11 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
phpunit:
docker-compose run --rm -T php /usr/local/bin/php /app/vendor/bin/phpunit

phpstan:
docker-compose run --rm -T php /usr/local/bin/php /app/vendor/bin/phpstan analyse

coverage:
docker-compose run --rm -T php /usr/local/bin/php /app/vendor/bin/phpunit --coverage-html=vendor/coverage

composer-update:
docker-compose run --rm -T php /usr/local/bin/php /usr/local/bin/composer update
40 changes: 17 additions & 23 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,24 +1,29 @@
SymfonyBundles JsonRequest Bundle
=================================
Symfony JsonRequest Bundle
==========================

[![SensioLabsInsight][sensiolabs-insight-image]][sensiolabs-insight-link]

[![Build Status][testing-image]][testing-link]
[![Scrutinizer Code Quality][scrutinizer-code-quality-image]][scrutinizer-code-quality-link]
[![Code Coverage][code-coverage-image]][code-coverage-link]
[![Total Downloads][downloads-image]][package-link]
[![Latest Stable Version][stable-image]][package-link]
[![License][license-image]][license-link]

Installation
------------

* Require the bundle with composer:

``` bash
composer req symfony-bundles/json-request-bundle
```

What is JsonRequest Bundle?
---------------------------
This bundle will help you to work with json requests as standard requests without using «crutches».
If previously for fetching of data from the request you did like this:
`$data = json_decode($request->getContent())`,
it is now in this already there is no need to.
This bundle will help you to work with json requests as standard requests without using «crutches». If previously for
fetching of data from the request you did like this:
`$data = json_decode($request->getContent())`, it is now in this already there is no need to.

For example when sending json-request from AngularJS, Vue.js or etc. Early:

For example when sending json-request from AngularJS, Vue.js or etc.
Early:
``` php
public function indexAction(Request $request)
{
Expand All @@ -30,30 +35,19 @@ public function indexAction(Request $request)
```

Now you can work with json-request as with standard request:

``` php
public function indexAction(Request $request)
{
$name = $request->get('name');
}
```

Installation
------------
* Require the bundle with composer:

``` bash
composer require symfony-bundles/json-request-bundle
```

[package-link]: https://packagist.org/packages/symfony-bundles/json-request-bundle
[license-link]: https://github.com/symfony-bundles/json-request-bundle/blob/master/LICENSE
[license-image]: https://poser.pugx.org/symfony-bundles/json-request-bundle/license
[testing-link]: https://travis-ci.org/symfony-bundles/json-request-bundle
[testing-image]: https://travis-ci.org/symfony-bundles/json-request-bundle.svg?branch=master
[stable-image]: https://poser.pugx.org/symfony-bundles/json-request-bundle/v/stable
[downloads-image]: https://poser.pugx.org/symfony-bundles/json-request-bundle/downloads
[sensiolabs-insight-link]: https://insight.sensiolabs.com/projects/dea68633-2368-4e12-a516-89157d2c6b07
[sensiolabs-insight-image]: https://insight.sensiolabs.com/projects/dea68633-2368-4e12-a516-89157d2c6b07/big.png
[code-coverage-link]: https://scrutinizer-ci.com/g/symfony-bundles/json-request-bundle/?branch=master
[code-coverage-image]: https://scrutinizer-ci.com/g/symfony-bundles/json-request-bundle/badges/coverage.png?b=master
[scrutinizer-code-quality-link]: https://scrutinizer-ci.com/g/symfony-bundles/json-request-bundle/?branch=master
Expand Down
16 changes: 0 additions & 16 deletions SymfonyBundlesJsonRequestBundle.php

This file was deleted.

23 changes: 0 additions & 23 deletions Tests/DependencyInjection/ConfigurationTest.php

This file was deleted.

Loading

0 comments on commit e4b2d71

Please sign in to comment.