crafty-cli's Introduction
crafty-cli's People
crafty-cli's Issues
Feedback
Key features / expectations
- Setup guide โ
- Table output for humans / json output as file โ
- Table output is readable โ
--output
option excepts a path to a file โ (you did prompt instead)--order
option ASC|DESC โ (you did a --ASC option instead)- Sorting works on the full dataset (~1.600 records) โ (yours breaks at --limit=101)
- Packagist.org API best practices โ (User-Agent header missing)
- Value Object
CraftPluginPackage
is actually used โ testLibrary
property contains test lib dependency name โ- Some Unit test โ
, but
- โก๏ธ tests don't work out of the box (vendor/bin/pest)
- โก๏ธ only one test works
- โก๏ธ another tests hangs
Code architecture
There is only one single class for data access, business logic, and output formatting - the PackagesCommand
.
The responsibility of a command (or controller) is delegation. But here it contains almost everything!
For future applications, even if it is a tiny one like this, consider writing small classes and with limited responsibilities. Separation of concerns is the high-level term in computer science for this. If you need concrete examples in PHP, have a look at this repo:
https://github.com/jupeter/clean-code-php
Following SOLID principles and Clean Code best practices (there is much overlap), helps to maintain the code in the long run and to write Unit tests that cover small bits of the functionality. It also helps other developers to understand your code better.
Quality
- A lot of features/requirements are not implemented according to the spec
- There are many leftovers from the
laravel-zero
andpestphp
boilerplate - According to your README.md and composer.json the package works with PHP ^7.3 | ^8.0, but you use PHP 8.0 syntax
- Test coverage is not sufficient
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.