PHPackages                             conquerorsoft/my\_first\_project - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. conquerorsoft/my\_first\_project

ActiveProject

conquerorsoft/my\_first\_project
================================

Project created with composer init

v1.0.0(8y ago)016MITPHPPHP ^5.6 || ^7.0

Since Nov 10Pushed 8y ago1 watchersCompare

[ Source](https://github.com/ConquerorSoft/my_first_project)[ Packagist](https://packagist.org/packages/conquerorsoft/my_first_project)[ Docs](http://www.conquerorsoft.com/my_first_project)[ RSS](/packages/conquerorsoft-my-first-project/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (3)Versions (13)Used By (0)

My First Project
================

[](#my-first-project)

[![Build Status](https://camo.githubusercontent.com/45f890cdc75f075ed3c35cc44f9c1f3fa2b91629e6bb106eeeb805a46c9e50ae/68747470733a2f2f7472617669732d63692e6f72672f436f6e717565726f72536f66742f6d795f66697273745f70726f6a6563742e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/ConquerorSoft/my_first_project) [![Software License](https://camo.githubusercontent.com/f251623e510f5909f16ae3f4e6e548dac11340b9fde1a99be26b015b39272c00/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c6174)](LICENSE.md) [![Coverage Status](https://camo.githubusercontent.com/10f8a174036fd9947d07da8727c62a00595dff6d46366b55cee8f4534d2740d8/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f636f7665726167652f672f636f6e717565726f72736f66742f6d795f66697273745f70726f6a6563742e7376673f7374796c653d666c6174)](https://scrutinizer-ci.com/g/conquerorsoft/my_first_project/code-structure) [![Quality Score](https://camo.githubusercontent.com/5b7ed99a9fbbd9da51ff3521036303eb3f0b5d405871fb9fe58867ba1d8a89c6/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f636f6e717565726f72736f66742f6d795f66697273745f70726f6a6563742e7376673f7374796c653d666c6174)](https://scrutinizer-ci.com/g/conquerorsoft/my_first_project) [![Latest Version on Packagist](https://camo.githubusercontent.com/36f0f8f43a20d3f47125c3f2cefb609cee9a126be5bc752482c8f0149af04792/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f636f6e717565726f72736f66742f6d795f66697273745f70726f6a6563742e7376673f7374796c653d666c6174)](https://packagist.org/packages/conquerorsoft/my_first_project)

This is my very first project I created at php\[world\]. I learned that I have to create a README file to provide a description of my project so it can be used by other projects or persons.

### The steps to create "my first project"

[](#the-steps-to-create-my-first-project)

1- create the my\_first\_project directory

```
cd ~ && mkdir -p phplibrary/my_first_project && cd phplibrary/my_first_project

```

2- create a README.md file

```
vim README.md

```

3- initialize a git repository

```
git init

```

4- Do the first commit

```
git add .
git commit -m "First commit of my project"

```

5- Assign a version to your project

```
git tag -a v0.1.0 -m "version 0.1.0"

```

6- Create a repository in github or bitbucket 7- Connect your repository with github (or bitbucket)

```
git remote add origin https://github.com/ConquerorSoft/my_first_project.git
git push -u origin master
git push origin v0.1.0

```

8- run composer init

```
composer init

```

9- enter all the information asked by composer init

```
Package name (/) [gabriel/my_first_project]: conquerorsoft/my_first_project
Description []: Project created with composer init
Author [Christian Varela , n to skip]: Christian Varela
Minimum Stability []:
Package Type (e.g. library, project, metapackage, composer-plugin) []: project
License []: MIT

Define your dependencies.

Would you like to define your dependencies (require) interactively [yes]?
Search for a package: php
Enter the version constraint to require (or leave blank to use the latest version): ^5.6 || ^7.0
Search for a package:
Would you like to define your dev dependencies (require-dev) interactively [yes]?
Search for a package: phpunit/phpunit
Enter the version constraint to require (or leave blank to use the latest version): ^5.7
Search for a package: squizlabs/php_codesniffer
Enter the version constraint to require (or leave blank to use the latest version): 3.*
Search for a package:

{
    "name": "conquerorsoft/my_first_project",
    "description": "Project created with composer init",
    "type": "project",
    "require": {
        "php": "^5.6 || ^7.0"
    },
    "require-dev": {
        "phpunit/phpunit": "^5.7",
        "squizlabs/php_codesniffer": "3.*"
    },
    "license": "MIT",
    "authors": [
        {
            "name": "Christian Varela",
            "email": "cvarela@conquerorsoft.com"
        }
    ]
}

Do you confirm generation [yes]?
Would you like the vendor directory added to your .gitignore [yes]?

```

10- composer.json file is created, edit it to include your library

```
{
    "name": "conquerorsoft/my_first_project",
    "description": "Project created with composer init",
    "type": "project",
    "repositories": [
        {
            "type": "vcs",
            "url": "/Users/gabriel/phplibrary/my_first_library"
        }
    ],
    "require": {
        "php": "^5.6 || ^7.0",
        "conquerorsoft/my_first_library": "^0.1"
    },
    "require-dev": {
        "phpunit/phpunit": "^5.7",
        "squizlabs/php_codesniffer": "3.*"
    },
    "license": "MIT",
    "authors": [
        {
            "name": "Christian Varela",
            "email": "cvarela@conquerorsoft.com"
        }
    ]
}

```

11- commit to git

```
git add .
git commit -m "Composer init"
git tag -a v0.1.1 -m "version 0.1.1"
git push -u origin master
git push origin v0.1.1

```

12- Run composer install

```
composer install

```

13- create a Changelog file ( this format is recommended: [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) )

```
vim CHANGELOG.md

```

14- commit to git

```
git add .
git commit -m "Changelog file added"
git tag -a v0.1.2 -m "version 0.1.2"
git push -u origin master
git push origin v0.1.2

```

15- Create structure for starting the development

```
mkdir src && mkdir tests

```

16- Edit the composer.json file to be this way now:

```
{
    "name": "conquerorsoft/my_first_project",
    "description": "Project created with composer init",
    "type": "project",
    "keywords": [
        "conquerorsoft",
        "my_first_project",
        "tutorial",
        "phpworld 2017",
        "workshop"
    ],
    "homepage": "http://www.conquerorsoft.com/my_first_project",
    "repositories": [
        {
            "type": "vcs",
            "url": "/Users/gabriel/phplibrary/my_first_library"
        }
    ],
    "require": {
        "php": "^5.6 || ^7.0",
        "conquerorsoft/my_first_library": "^0.1"
    },
    "require-dev": {
        "phpunit/phpunit": "^5.7",
        "squizlabs/php_codesniffer": "3.*"
    },
    "license": "MIT",
    "authors": [
        {
            "name": "Christian Varela",
            "email": "cvarela@conquerorsoft.com",
            "homepage": "http://www.conquerorsoft.com/ChristianVarela",
            "role": "Developer"
        }
    ],
    "minimum-stability": "stable",
    "scripts": {
        "test": "phpunit",
        "check-style": "phpcs -p --standard=PSR2 --runtime-set ignore_errors_on_exit 1 --runtime-set ignore_warnings_on_exit 1 src tests",
        "fix-style": "phpcbf -p --standard=PSR2 --runtime-set ignore_errors_on_exit 1 --runtime-set ignore_warnings_on_exit 1 src tests"
    }
}

```

17- Create file phpunit.xml

```
vim phpunit.xml

```

18- add build to .gitignore

```
echo build >> .gitignore

```

19- run composer update

```
composer update

```

20- commit to git

```
echo "build/" >> .gitignore
git add .
git commit -m "Preparation for development"
git tag -a v0.1.3 -m "version 0.1.3"
git push -u origin master
git push origin v0.1.3

```

21- Add a LICENSE.md file (for this example we chose MIT)

```
vim LICENSE.md

```

22- Create tests/FirstProjectClassTest.php

```
vim tests/FirstProjectClassTest.php

```

23- Create src/FirstProjectClass.php

```
vim src/FirstProjectClass.php

```

24- Add autoload section to composer.json

```
"autoload": {
    "psr-4": {
        "conquerorsoft\\my_first_project\\": "src"
    }
},
"autoload-dev": {
    "psr-4": {
        "conquerorsoft\\my_first_project\\": "test"
    }
},

```

25- Rum composer dump-autoload

```
composer dump-autoload

```

26- commit to git

```
git add .
git commit -m "Classes from project calling my library"
git tag -a v0.1.4 -m "version 0.1.4"
git push -u origin master
git push origin v0.1.4

```

27- add repository to Travis and create travis configuration file

```
vim .travis.yml

```

28- commit to git

```
git add .
git commit -m "Travis CI integration"
git tag -a v0.1.5 -m "version 0.1.5"
git push -u origin master
git push origin v0.1.5

```

29- Change composer.json to use github repository instead of file system local folder

```
vim composer.json

"repositories": [
    {
        "type": "vcs",
        "url": "https://github.com/ConquerorSoft/my_first_library"
    }
],

```

30- run composer update

```
composer update

```

31- commit to git

```
git add .
git commit -m "VCS reference changed for my_first_library in composer.json"
git tag -a v0.1.6 -m "version 0.1.6"
git push -u origin master
git push origin v0.1.6

```

32- Remove references for repositories in composer.json since now the library is on packagist.org 33- Run composer update

```
composer clearcache
composer update

```

34- commit to git

```
git add .
git commit -m "my_first_library is now taken from packagist"
git tag -a v0.1.7 -m "version 0.1.7"
git push -u origin master
git push origin v0.1.7

```

35- Link scrutinizer-ci account with github and create .scrutinizer.yml file

```
vim .scrutinizer.yml

```

36- commit to git

```
git add .
git commit -m "Scrutinizer support added"
git tag -a v0.1.8 -m "version 0.1.8"
git push -u origin master
git push origin v0.1.8

```

37- change composer.json to require version ^1.0.0 for my\_first\_library

```
"conquerorsoft/my_first_library": "^1.0"

```

38- run composer update

```
composer update

```

39- commit to git

```
git add .
git commit -m "Using version ^1.0 from my_first_library"
git tag -a v0.1.9 -m "version 0.1.9"
git push -u origin master
git push origin v0.1.9

```

40- Create contributing files

```
vim CONTRIBUTING.md
vim CODE_OF_CONDUCT.md

```

43- Add more sections to README file

- Install
- Change log
- Testing

44- commit to git

```
git add .
git commit -m "Improvements to README"
git tag -a v0.1.10 -m "version 0.1.10"
git push -u origin master
git push origin v0.1.10

```

45- submit the package to packagist.org using the github repository 46- Make the package to be autoupdated in packagist on push

- Go to your GitHub repository
- Click the "Settings" button
- Click "Integrations &amp; services"
- Add a "Packagist" service, and configure it with your API token, plus your Packagist username
- Check the "Active" box and submit the form

47- Add last version in packagist badge to README.md file

```
vim README.md

```

48- commit to git

```
git add .
git commit -m "Instructions to use packagist.org in README"
git tag -a v0.1.11 -m "version 0.1.11"
git push -u origin master
git push origin v0.1.11

```

49- Create a gh-pages branch

```
git checkout -b gh-pages
git push -u origin gh-pages
git checkout master

```

50- Go to github settings for your repository 51- Choose a theme in GitHub Pages section 52- Your project page is ready now: [https://conquerorsoft.github.io/my\_first\_project/](https://conquerorsoft.github.io/my_first_project/)53- commit to git and increase version

```
git add .
git commit -m "Documentation instructions for the project"
git tag -a v1.0.0 -m "version 1.0.0"
git push -u origin master
git push origin v1.0.0

```

Install
-------

[](#install)

With composer

```
composer create-project conquerorsoft/my_first_project

```

Usage
-----

[](#usage)

```
cd src
php -a
    Interactive shell

    php > include ('../vendor/autoload.php');
    php > $fpc=new conquerorsoft\my_first_project\FirstProjectClass();
    php > echo $fpc->encoding("Test string");
    The string 'Test string' is encoded as '2n12 120rwp'
    php > echo $fpc->decoding("2n12 120rwp");
    The string '2n12 120rwp' is decoded as 'test string'
    php > exit

```

Change Log
----------

[](#change-log)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Testing
-------

[](#testing)

```
composer test

```

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) and [CODE\_OF\_CONDUCT](CODE_OF_CONDUCT.md) for details.

Security
--------

[](#security)

If you discover any security related issues, please email  instead of using the issue tracker.

Credits
-------

[](#credits)

- [Christian Varela](https://github.com/gabrielconqueror)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity65

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

12

Last Release

3103d ago

Major Versions

v0.1.11 → v1.0.02017-11-11

### Community

Maintainers

![](https://www.gravatar.com/avatar/93d8bdab240bc597b063e912bca26fda6b7deb030e5dfea4932ac7292815a1ad?d=identicon)[gabriel0702](/maintainers/gabriel0702)

---

Top Contributors

[![cvarela0702](https://avatars.githubusercontent.com/u/1228242?v=4)](https://github.com/cvarela0702 "cvarela0702 (13 commits)")

---

Tags

tutorialworkshopconquerorsoftphpworld 2017my\_first\_project

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/conquerorsoft-my-first-project/health.svg)

```
[![Health](https://phpackages.com/badges/conquerorsoft-my-first-project/health.svg)](https://phpackages.com/packages/conquerorsoft-my-first-project)
```

###  Alternatives

[php-school/learn-you-php

An introduction to PHP's core features: i/o, http, arrays, exceptions and so on.

3192.0k](/packages/php-school-learn-you-php)[php-school/php-workshop

PHP Workshop Framework

466.3k6](/packages/php-school-php-workshop)[macopedia/typo3-interactive-tour

An interactive tour through the TYPO3 backend.

131.8k](/packages/macopedia-typo3-interactive-tour)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
