Skip to content

Commit

Permalink
1.) added: code format
Browse files Browse the repository at this point in the history
ReComposerController:
1.) added: direct di injection the laravel way
2.) added: code format

ReComposer:
1.) replaced: array_first to Arr::first to avoid breaking on newer versions

composer.json:
1.) removed: support for laravel 8 and below
2.) removed: support for php 7.4
3.) added: bugfix to dependencies install
  • Loading branch information
Faks committed Feb 12, 2023
2 parents 49d434a + c89c8af commit 123f3fb
Show file tree
Hide file tree
Showing 10 changed files with 320 additions and 287 deletions.
14 changes: 10 additions & 4 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@ Contributions are welcome and will be fully credited.
Contributions are accepted via Pull Requests on [Github](https://github.com/solumdesignum/recomposer).

# Things you could do

If you want to contribute but do not know where to start, this list provides some starting points.

- Add license text
- Remove rewriteRules.php
- Set up TravisCI, StyleCI, ScrutinizerCI
Expand All @@ -17,13 +19,17 @@ If you want to contribute but do not know where to start, this list provides som

- **Add tests!** - Your patch won't be accepted if it doesn't have tests.

- **Document any change in behaviour** - Make sure the `readme.md` and any other relevant documentation are kept up-to-date.
- **Document any change in behaviour** - Make sure the `readme.md` and any other relevant documentation are kept
up-to-date.

- **Consider our release cycle** - We try to follow [SemVer v2.0.0](http://semver.org/). Randomly breaking public APIs is not an option.
- **Consider our release cycle** - We try to follow [SemVer v2.0.0](http://semver.org/). Randomly breaking public APIs
is not an option.

- **One pull request per feature** - If you want to do more than one thing, send multiple pull requests.

- **Send coherent history** - Make sure each individual commit in your pull request is meaningful. If you had to make multiple intermediate commits while developing, please [squash them](http://www.git-scm.com/book/en/v2/Git-Tools-Rewriting-History#Changing-Multiple-Commit-Messages) before submitting.

- **Send coherent history** - Make sure each individual commit in your pull request is meaningful. If you had to make
multiple intermediate commits while developing,
please [squash them](http://www.git-scm.com/book/en/v2/Git-Tools-Rewriting-History#Changing-Multiple-Commit-Messages)
before submitting.

**Happy coding**!
25 changes: 10 additions & 15 deletions LICENSE.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,15 @@ MIT License

Copyright (c) Oskars Germovs

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
documentation files (the "Software"), to deal in the Software without restriction, including without limitation the
rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit
persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the
Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NON INFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON INFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
28 changes: 22 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,26 @@
[![MIT Licensed](https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square)](LICENSE.md)

## Introduction
Laravel ReComposer decomposes and lists all the installed packages with their
dependencies along with the Laravel & the Server environment details your app is running in.

Laravel ReComposer decomposes and lists all the installed packages with their dependencies along with the Laravel & the
Server environment details your app is running in.

## Required before installation

Please make sure du is installed on linux, or unix, mac.

### Important
I regret to inform windows currently is not supported.

I regret to inform windows currently is not supported.

#### Exceptions to this is rule is

Any type of virtualization docker, Virtual Machine and anything similar to it.

## Installation

To get started, install ReComposer using the Composer package manager:

```shell
composer require solumdesignum/recomposer
```
Expand All @@ -29,11 +36,12 @@ Next, publish ReComposer resources using the vendor:publish command:
php artisan vendor:publish --provider="SolumDeSignum\ReComposer\ReComposerServiceProvider"
```

This command will publish a config to your config directory, which will be
created if it does not exist.
This command will publish a config to your config directory, which will be created if it does not exist.

### ReComposer Features

The configuration file contains configurations.

```php
<?php

Expand Down Expand Up @@ -86,22 +94,30 @@ Add a route in your web routes file:
```php
Route::get('recomposer','\SolumDeSignum\ReComposer\Controllers\ReComposerController@index');
```

Go to http://yourapp/recomposer or the route you configured above in the routes file.

## Contributing
Thank you for considering contributing to the Laravel ReComposer. You can read the contribution guidelines [here](CONTRIBUTING.md)

Thank you for considering contributing to the Laravel ReComposer. You can read the contribution
guidelines [here](CONTRIBUTING.md)

## Security

If you discover any security-related issues, please email to [Solum DeSignum](mailto:[email protected]).

## Author

- [Oskars Germovs](https://github.com/Faks)

## About

[Solum DeSignum](https://solum-designum.eu) is a web design agency based in Latvia, Riga.

## License

Laravel ReComposer is open-sourced software licensed under the [MIT license](LICENSE.md)

## Idea

This package concept is based on a package decomposer (abandon).
32 changes: 20 additions & 12 deletions REPORT.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,30 @@
## Understanding the ReComposer report

- The system report generated by Laravel ReComposer is a detailed file in the markdown format containing the Laravel & Server Environment details both of your laravel app which can help you in troubleshooting.
- Along with the Laravel & Server environment details, Laravel ReComposer report
also shows whether the [required configurations](https://laravel.com/docs/5.5#installation) by Laravel are implemented or not in your environment.
- Suppose suddenly or after some changes your app broke, you can install Laravel ReComposer, generate & copy the report and paste it in the issue box of the respective repo you are reporting the issue to.
- The issue might be because of a specific package or laravel in your specific dev environment. This report gives all the info required at once to the respective package developer who is working on resolving the issue to know the environment you are working in, that might help in recreating the issue.
- For package/laravel app developers this can be very useful when collecting the information from the users reporting the issues.
- The system report generated by Laravel ReComposer is a detailed file in the markdown format containing the Laravel &
Server Environment details both of your laravel app which can help you in troubleshooting.
- Along with the Laravel & Server environment details, Laravel ReComposer report also shows whether
the [required configurations](https://laravel.com/docs/5.5#installation) by Laravel are implemented or not in your
environment.
- Suppose suddenly or after some changes your app broke, you can install Laravel ReComposer, generate & copy the report
and paste it in the issue box of the respective repo you are reporting the issue to.
- The issue might be because of a specific package or laravel in your specific dev environment. This report gives all
the info required at once to the respective package developer who is working on resolving the issue to know the
environment you are working in, that might help in recreating the issue.
- For package/laravel app developers this can be very useful when collecting the information from the users reporting
the issues.
- This report can be easily copied by clicking the copy report button.
- The format is Markdown because the aim of the report is to quickly send over the laravel & server environment details from the user to the issue box of the repo making available the details in a neat markdown format to the respective developer.
- The format is Markdown because the aim of the report is to quickly send over the laravel & server environment details
from the user to the issue box of the repo making available the details in a neat markdown format to the respective
developer.

## Report Contents

- List of all installed packages along with their version numbers
- Laravel Version
- Timezone
- Is the Debug Mode on or off
- Is the Storage Dir Writable
- Cache Dir Writable
- Laravel Version
- Timezone
- Is the Debug Mode on or off
- Is the Storage Dir Writable
- Cache Dir Writable
- ReComposer Version
- Size of your Laravel app
- PHP Version installed on your server
Expand Down
7 changes: 4 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,10 @@
],
"homepage": "https://github.com/solumdesignum/recomposer",
"require": {
"php": "^7.4|^8.0",
"illuminate/support": "^5.5 || ^6.0 || ^7.0 || ^8.0 || ^9.0",
"illuminate/view": "^5.5 || ^6.0 || ^7.0 || ^8.0 || ^9.0"
"php": "^8.0|^8.1|^8.2",
"illuminate/support": "~9|~10",
"illuminate/view": "~9|^10",
"gabrielelana/byte-units": "^0.5"
},
"require-dev": {
"roave/security-advisories": "dev-master",
Expand Down
14 changes: 7 additions & 7 deletions config/recomposer.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,18 @@

return [
'basePath' => base_path(),
'binary' => [
'format' => 'kilobytes',
'search' => 'MiB',
'binary' => [
'format' => 'kilobytes',
'search' => 'MiB',
'replace' => 'mb',
],
'view' => 'solumdesignum/recomposer::index',
'view' => 'solumdesignum/recomposer::index',
'cache' => [
'feature' => false,
'hours' => 1,
'hours' => 1,
],
'icon' => [
'check' => '<i class="fas fa-check"></i>',
'check' => '<i class="fas fa-check"></i>',
'uncheck' => '<i class="fas fa-times"></i>',
],
'exclude' => [
Expand All @@ -34,7 +34,7 @@
],
],
'packages' => [
'enabled' => true,
'enabled' => true,
'blacklist' => [
'php',
'roave/security-advisories',
Expand Down
32 changes: 12 additions & 20 deletions src/Controllers/ReComposerController.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,38 +4,30 @@

namespace SolumDeSignum\ReComposer\Controllers;

use function config;
use Illuminate\View\View;
use SolumDeSignum\ReComposer\ReComposer;

use function config;

class ReComposerController
{
private ReComposer $recomposer;

/**
* ReComposerController constructor.
*/
public function __construct()
{
$this->recomposer = new ReComposer();
}

/**
* @param ReComposer $recomposer
* @return View
*/
public function index(): View
public function index(ReComposer $recomposer): View
{
return view(
config('recomposer.view', 'solumdesignum/recomposer::index'),
[
'packages' => $this->recomposer->packages,
'laravelEnv' => $this->recomposer->laravelEnvironment(),
'serverEnv' => $this->recomposer->serverEnvironment(),
'serverExtras' => $this->recomposer->serverExtras(),
'laravelExtras' => $this->recomposer->laravelExtras(),
'extraStats' => $this->recomposer->extraStats(),
'iconCheck' => config('recomposer.icon.check'),
'iconUncheck' => config('recomposer.icon.uncheck'),
'packages' => $recomposer->packages,
'laravelEnv' => $recomposer->laravelEnvironment(),
'serverEnv' => $recomposer->serverEnvironment(),
'serverExtras' => $recomposer->serverExtras(),
'laravelExtras' => $recomposer->laravelExtras(),
'extraStats' => $recomposer->extraStats(),
'iconCheck' => config('recomposer.icon.check'),
'iconUncheck' => config('recomposer.icon.uncheck'),
]
);
}
Expand Down
Loading

0 comments on commit 123f3fb

Please sign in to comment.