Skip to content

Commit

Permalink
Merge pull request #61 from prodeveloper/upgrades
Browse files Browse the repository at this point in the history
Upgrades
  • Loading branch information
datashaman authored Dec 20, 2021
2 parents 7687f8b + e1387f5 commit cca9bf4
Show file tree
Hide file tree
Showing 23 changed files with 335 additions and 146 deletions.
16 changes: 16 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# EditorConfig is awesome: http://EditorConfig.org
root = true

[*]
charset = utf-8
end_of_line = lf
indent_size = 4
indent_style = space
insert_final_newline = true
trim_trailing_whitespace = true

[*.md]
trim_trailing_whitespace = false

[*.yml]
indent_size = 2
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* text=auto eol=lf whitespace=tab-in-indent,blank-at-eol,tabwidth=4
42 changes: 42 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
---
name: Tests

on:
pull_request:
branches:
- master

env:
# see https://github.com/composer/composer/issues/9368#issuecomment-718112361
COMPOSER_ROOT_VERSION: "dev-master"

jobs:
tests:
runs-on: ubuntu-latest

strategy:
fail-fast: true
matrix:
laravel: [^6, ^7, ^8]
php: [7.4, 8.0]

name: PHP ${{ matrix.php }} / Laravel ${{ matrix.laravel }}

steps:
- uses: actions/checkout@v2
# required for "git tag" presence for changelog-linker git tags resolver; default is 1
# https://github.com/actions/checkout#fetch-all-tags
- run: git fetch --depth=1 origin +refs/tags/*:refs/tags/*
# see https://github.com/shivammathur/setup-php
- uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
coverage: none

- uses: "ramsey/composer-install@v1"
with:
composer-options: ${{ matrix.composer-options }}

- run: composer require "illuminate/support:${{ matrix.laravel }}" --no-interaction --no-update

- run: vendor/bin/phpunit
9 changes: 5 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/vendor
composer.phar
composer.lock
.DS_Store
.idea
.idea
/.phpunit.result.cache
/composer.lock
/composer.phar
/vendor
110 changes: 110 additions & 0 deletions .php-cs-fixer.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
<?php

$config = new PhpCsFixer\Config();

return $config
->setRiskyAllowed(true)
->setRules(
[
'@PSR12' => true,
'psr_autoloading' => true,
'align_multiline_comment' => true,
'array_syntax' => [
'syntax' => 'short',
],
'binary_operator_spaces' => true,
'blank_line_before_statement' => [
'statements' => [
'return',
'throw',
],
],
'cast_spaces' => [
'space' => 'single',
],
'concat_space' => [
'spacing' => 'one',
],
'method_chaining_indentation' => true,
'function_typehint_space' => true,
'multiline_comment_opening_closing' => true,
'general_phpdoc_annotation_remove' => [
'annotations' => [
'author',
'package',
'subpackage',
],
],
'include' => true,
'linebreak_after_opening_tag' => true,
'mb_str_functions' => true,
'magic_method_casing' => true,
'magic_constant_casing' => true,
'class_attributes_separation' => [
'elements' => [
'const' => 'one',
'method' => 'one',
'property' => 'one',
],
],
'modernize_types_casting' => true,
'native_function_casing' => true,
'no_blank_lines_after_phpdoc' => true,
'no_empty_comment' => true,
'no_empty_phpdoc' => true,
'no_empty_statement' => true,
'no_extra_blank_lines' => true,
'no_mixed_echo_print' => [
'use' => 'echo',
],
'multiline_whitespace_before_semicolons' => [
'strategy' => 'no_multi_line',
],
'no_php4_constructor' => true,
'no_short_bool_cast' => true,
'no_trailing_comma_in_singleline_array' => true,
'no_unused_imports' => true,
'no_whitespace_before_comma_in_array' => true,
'object_operator_without_whitespace' => true,
'phpdoc_add_missing_param_annotation' => [
'only_untyped' => false,
],
'phpdoc_indent' => true,
'general_phpdoc_tag_rename' => true,
'phpdoc_no_alias_tag' => [
'replacements' => [
'type' => 'var',
'link' => 'see',
],
],
'phpdoc_no_empty_return' => true,
'phpdoc_no_package' => true,
'phpdoc_no_useless_inheritdoc' => true,
'phpdoc_order' => true,
'phpdoc_scalar' => true,
'phpdoc_separation' => true,
'phpdoc_trim' => true,
'phpdoc_types' => true,
'phpdoc_var_without_name' => true,
'random_api_migration' => true,
'single_line_comment_style' => [
'comment_types' => [
'asterisk',
'hash',
],
],
'single_quote' => false,
'space_after_semicolon' => true,
'standardize_not_equals' => true,
'ternary_to_null_coalescing' => true,
'trailing_comma_in_multiline' => [
'elements' => [
'arrays',
],
],
'trim_array_spaces' => true,
'unary_operator_spaces' => true,
'yoda_style' => false,
'phpdoc_summary' => false,
]
);
15 changes: 15 additions & 0 deletions .phpcs.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?xml version="1.0"?>
<ruleset name="Share">
<description></description>

<rule ref="PSR12">
<exclude name="PSR2.ControlStructures.ControlStructureSpacing.SpacingAfterOpenBrace"/>
</rule>

<rule ref="Generic.Files.LineLength">
<properties>
<property name="lineLimit" value="120"/>
<property name="absoluteLineLimit" value="120"/>
</properties>
</rule>
</ruleset>
16 changes: 3 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Share

Share links with Laravel 5
**Share links with Laravel**

This is a fork to John's share for Laravel 4.
This is a fork of John's share for Laravel 4.

## Services available

Expand All @@ -26,20 +26,10 @@ This is a fork to John's share for Laravel 4.

## Installation

Step 1 : Install Composer dependency
Install Composer dependency into your project

composer require chencha/share

Step 2 : Register the Service Provider

Add *Chencha\Share\ShareServiceProvider* to providers array in *config/app.php*

Step 3 : Register Alias


Add *Share* => *Chencha\Share\ShareFacade* to aliases array in *config/app.php*


## Usage

Get a link (example with Twitter)
Expand Down
26 changes: 10 additions & 16 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
{
"name": "chencha/share",
"description": "Share links with Laravel 5/6",
"description": "Share links with Laravel",
"keywords": [
"share",
"laravel",
"laravel5",
"laravel6"
"laravel"
],
"version": "5.4.0",
"version": "5.6.0",
"license": "MIT",
"authors": [
{
Expand All @@ -24,16 +22,14 @@
}
],
"require": {
"php": ">=5.4.0",
"illuminate/support": "5.*|^6|^7"
"php": "^7.4|^8",
"illuminate/support": "^6|^7|^8"
},
"autoload": {
"psr-0": {
"Chencha\\Share": "src/"
},
"classmap": [
"tests/TestCase.php"
]
"psr-4": {
"Chencha\\Share\\" : "src/",
"Tests\\": "tests/"
}
},
"extra": {
"laravel": {
Expand All @@ -47,8 +43,6 @@
},
"minimum-stability": "dev",
"require-dev": {
"orchestra/testbench": "~3.0",
"mockery/mockery": "^0.9.4",
"guzzlehttp/guzzle": ">=5.3"
"orchestra/testbench": "^4|^5|^6"
}
}
File renamed without changes.
18 changes: 0 additions & 18 deletions phpunit.xml

This file was deleted.

13 changes: 13 additions & 0 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="./vendor/phpunit/phpunit/phpunit.xsd"
bootstrap="vendor/autoload.php"
colors="true"
>
<testsuites>
<testsuite name="Social Share Test Suite">
<directory suffix="Test.php">./tests/</directory>
</testsuite>
</testsuites>
</phpunit>
14 changes: 0 additions & 14 deletions src/Chencha/Share/ShareFacade.php

This file was deleted.

52 changes: 0 additions & 52 deletions src/Chencha/Share/ShareServiceProvider.php

This file was deleted.

Loading

0 comments on commit cca9bf4

Please sign in to comment.