承接 sebastianknott/dev-utils 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

sebastianknott/dev-utils

Composer 安装命令:

composer require sebastianknott/dev-utils

包简介

This is a collection of stuff I need for developing.

README 文档

README

... or in short DUSK (Yeah. That's how I roll) is a tool set for my personal development projects. It helps me get things of the ground rather quick and keeps things hassle free and automated. I try to keep things civil, so it SHOULD work with php >= 7.2, but I will focus on running up-to-date versions of PHP.

Whats included?

Here comes a short list of stuff you can find here.

Unit Tests Tools

For UnitTest I personally prefer the obvious.

DevUtilsTestCase

I included a new base class for unit tests called DevUtilsTestCase. This class will have an instance of faker and my personal SystemUnderTestFactory. Additionally the global functions of mockery and hamcrest are accessible in your test class.

<?php

use Mockery\MockInterface;
use SebastianKnott\DevUtils\Test\Infrastructure\DevToolsTestCase;

class ExampleTest extends DevToolsTestCase
{
   public function testExample(){
       // Build your subject with mocked dependencies. There is
       // also a method for all you phake fans out there ^^
       $subjectBundle = self::$factory
           ->buildSutWithMockery(Example::class);

       // Access your subject by getting it from the bundle.
       $subject = $subjectBundle->getSubject();

       // Access the corresponding mocked constructor parameters
       // by name with array notation.
       /** @var MockInterface $firstParameter */
       $firstParameter = $subjectBundle['firstParameterName'];

       // Notice that you can access hamcrest functions globally
       // (e.g. `startsWith`)
       $firstParameter->shouldReceive('myTest')
           ->with(startsWith('bla'));

       // ... and faker stands by for your disposal
       $result = $subject->runMyStuff(self::$faker->address);

       assertThat($result, is(boolValue()));
   }
}

Deployer

I wrote two rather unusual recipes for deployer.

Recipe staticCodeAnalysis

This recipe contains targets for the tools found under Code Quality Tools.

dep <command> What it does
sca Static Code Analysis - runs all sca commands in order
sca:lint Check for syntax errors
sca:phpcpd Check for copy/paste violations
sca:phpcs Runs Code Sniffer with my coding-standard
sca:phpcs:fix Runs Code Sniffer in fix mode
sca:phpmd Check for messy code
sca:phpstan Check for messy code with phpstan
sca:psalm Check for messy code with vimeos psalm

Recipe unitTest

This recipe contains targets for phpunit and infection to run efficiently.

dep <command> What it does
test:infection Runs infections for phpunit. Has a dependency on test:phpunit
test:phpunit Runs phpunit tests

Composer Libraries I like

There is a list of tools I really love and install sooner or later anyway.

Code Quality Tools

All the tools I need with configurations compatible to each other.

For now everything is just a scaffold for things to come. Everything is stitched together by deployer. A simple dep sca should execute all tools.

Included with phpcs comes my own coding-standard. A pretty mellow mix between slevomats coding-standard and PSR-12.

统计信息

  • 总下载量: 275
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: GPL-3.0-only
  • 更新时间: 2020-08-06

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固