Giter Site home page Giter Site logo

crafty-cli's Introduction

Hi there ๐Ÿ‘‹

crafty-cli's People

Contributors

njaaazi avatar

Watchers

 avatar

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 and pestphp 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 photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.