Skip to content

Commit ddf08d7

Browse files
authored
dev: remove vendor from GH repo (#427)
1 parent 8043eb5 commit ddf08d7

File tree

140 files changed

+324
-12992
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

140 files changed

+324
-12992
lines changed

.distignore

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,17 +17,17 @@
1717
.DS_Store
1818
.env
1919
.env.dist
20-
.gitattributes
2120
.gitignore
2221
.phpcs.xml
2322
.phpcs.xml.dist
23+
auth.json
2424
CHANGELOG.md
2525
codeception.dist.yml
2626
codeception.yml
2727
composer.json
2828
composer.lock
2929
docker-compose.yml
3030
phpstan.neon.dist
31-
phpunit.xml.dist
31+
phpstan.neon
3232
README.md
3333
schema.graphql

.gitattributes

Lines changed: 0 additions & 18 deletions
This file was deleted.

.github/workflows/upload-release.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,13 @@ jobs:
2020
tools: composer
2121

2222
- name: Install dependencies
23+
uses: ramsey/composer-install@v3
24+
with:
25+
composer-options: "--no-progress --no-dev --optimize-autoloader"
26+
27+
- name: Build and zip
2328
run: |
24-
composer install --no-dev --optimize-autoloader
25-
- name: Create Artifact
26-
run: |
27-
mkdir -p plugin-build/wp-graphql-gravity-forms
28-
rsync -rc --exclude-from=.distignore --exclude=plugin-build . plugin-build/wp-graphql-gravity-forms/ --delete --delete-excluded -v
29-
cd plugin-build ; zip -r wp-graphql-gravity-forms.zip wp-graphql-gravity-forms
29+
composer run-script zip
3030
3131
- name: Upload artifact
3232
uses: actions/upload-artifact@v4

.gitignore

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ Thumbs.db
1515

1616
# Ruleset Overrides
1717
phpcs.xml
18-
phpunit.xml
1918
phpstan.neon
2019

2120
# Directory to generate the dist zipfile
@@ -25,12 +24,7 @@ plugin-build
2524
auth.json
2625

2726
# Composer deps
28-
!vendor
29-
vendor/*
30-
!vendor/autoload.php
31-
!vendor/composer
32-
vendor/composer/*/
33-
!vendor/yahnis-elsts
27+
vendor
3428

3529
# Generated Schema used in some tooling. Versioned Schema is uploaded as a Release artifact to Github.
3630
schema.graphql

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
- fix: Check for Submission Confirmation url before attempting to get the associated post ID.
1212
- fix: Flush static Gravity Forms state between multiple calls to `GFUtils::submit_form()`.
1313
- feat: Add `FieldError.connectedFormField` connection to `FieldError` type.
14+
- dev: Remove `vendor` directory from the GitHub repository.
1415
- dev: Use `FormFieldsDataLoader` to resolve fields instead of instantiating a new `Model`.
1516
- chore: Add iterable type hints.
1617
- chore!: Bump minimum WPGraphQL version to v1.26.0.

README.md

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,21 +26,26 @@ Our hope for this open source project is that it will enable more teams to lever
2626

2727
## System Requirements
2828

29-
* PHP 7.4-8.2+
30-
* WordPress 6.0+
31-
* WPGraphQL 1.26.0+
32-
* Gravity Forms 2.7+
29+
* PHP: 7.4-8.2+
30+
* WordPress: 6.0+
31+
* WPGraphQL: 1.26.0+
32+
* Gravity Forms: 2.7+
3333
* **Recommended**: [WPGraphQL Upload](https://github.com/dre1080/wp-graphql-upload) - used for [File Upload and Post Image submissions](docs/submitting-forms.md).
3434

3535
## Quick Install
3636

3737
1. Install & activate [WPGraphQL](https://www.wpgraphql.com/).
3838
2. Install & activate [Gravity Forms](https://www.gravityforms.com/) and any supported addons.
39-
3. Download the [latest release](https://github.com/axewp/wp-graphql-gravity-forms/releases) `.zip` file, upload it to your WordPress install, and activate the plugin.
39+
3. Download the `wp-graphql-gravity-forms.zip` file from the [latest release](https://github.com/AxeWP/wp-graphql-gravity-forms/releases/latest) upload it to your WordPress install, and activate the plugin.
40+
41+
> [!IMPORTANT]
42+
> Make sure you are downloading the [`wp-graphql-gravity-forms.zip`](https://github.com/axewp/wp-graphql-gravity-forms/releases/latest/download/wp-graphql-gravity-forms.zip) file from the releases page, not the `Source code (zip)` file nor a clone of the repository.
43+
>
44+
> If you wish to use the source code, you will need to run `composer install` inside the plugin folder to install the required dependencies.
4045
4146
### With Composer
4247

43-
```console
48+
```bash
4449
composer require harness-software/wp-graphql-gravity-forms
4550
```
4651

activation.php

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
<?php
2+
/**
3+
* Activation Hook
4+
*
5+
* @package WPGraphql\GF
6+
*/
7+
8+
declare( strict_types = 1 );
9+
10+
namespace WPGraphQL\GF;
11+
12+
/**
13+
* Runs when the plugin is activated.
14+
*/
15+
function activation_callback(): callable {
16+
return static function (): void {
17+
do_action( 'graphql_gf_activate' );
18+
19+
// Store the current version of the plugin.
20+
update_option( 'wp_graphql_gf_version', WPGRAPHQL_GF_VERSION );
21+
};
22+
}

composer.json

Lines changed: 20 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
{
22
"name": "harness-software/wp-graphql-gravity-forms",
3-
"description": "WPGraphQL for Gravity Forms",
3+
"description": "Adds WPGraphQL support for Gravity Forms",
44
"type": "wordpress-plugin",
55
"license": "GPL-3.0-or-later",
66
"support": {
7-
"issues": "https://github.com/axewp/wp-graphql-gravity-forms/issues",
8-
"source": "https://github.com/axewp/wp-graphql-gravity-forms"
7+
"email": "[email protected]",
8+
"issues": "https://github.com/AxeWP/wp-graphql-gravity-forms/issues",
9+
"forum": "https://github.com/AxeWP/wp-graphql-gravity-forms/discussions"
910
},
1011
"authors": [
1112
{
@@ -47,15 +48,17 @@
4748
"phpcompatibility/php-compatibility": "dev-develop as 9.99.99"
4849
},
4950
"config": {
50-
"optimize-autoloader": true,
51-
"process-timeout": 0,
52-
"platform": {
53-
"php": "7.4.0"
54-
},
5551
"allow-plugins": {
5652
"dealerdirect/phpcodesniffer-composer-installer": true,
5753
"phpstan/extension-installer": true
58-
}
54+
},
55+
"platform": {
56+
"php": "7.4"
57+
},
58+
"preferred-install": "dist",
59+
"sort-packages": true,
60+
"optimize-autoloader": true,
61+
"process-timeout": 0
5962
},
6063
"autoload": {
6164
"psr-4": {
@@ -92,29 +95,14 @@
9295
"php ./vendor/bin/phpcbf"
9396
],
9497
"phpstan": [
95-
"phpstan analyze --ansi --memory-limit=1G -v"
96-
]
97-
},
98-
"archive": {
99-
"name": "wp-graphql-gravity-forms",
100-
"exclude": [
101-
"/.*",
102-
"bin",
103-
"docker",
104-
"docs",
105-
"phpstan",
106-
"plugin-build",
107-
"tests",
108-
"!vendor",
109-
"!.wordpress-org",
110-
"/codeception.dist.yml",
111-
"/codeception.yml",
112-
"/composer.json",
113-
"/composer.lock",
114-
"/docker-compose.yml",
115-
"/phpstan.neon.dist",
116-
"/phpunit.xml.dist",
117-
"README.md"
98+
"vendor/bin/phpstan analyze --ansi --memory-limit=1G -v"
99+
],
100+
"zip": [
101+
"composer install --no-dev --optimize-autoloader",
102+
"mkdir -p plugin-build/wp-graphql-gravity-forms",
103+
"rsync -rc --exclude-from=.distignore --exclude=plugin-build . plugin-build/wp-graphql-gravity-forms/ --delete --delete-excluded -v",
104+
"cd plugin-build ; zip -r wp-graphql-gravity-forms.zip wp-graphql-gravity-forms",
105+
"rm -rf plugin-build/wp-graphql-gravity-forms/"
118106
]
119107
}
120108
}

composer.lock

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

deactivation.php

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
<?php
2+
/**
3+
* Deactivation Hook
4+
*
5+
* @package WPGraphql\GF
6+
*/
7+
8+
declare( strict_types = 1 );
9+
10+
namespace WPGraphQL\GF;
11+
12+
/**
13+
* Runs when WPGraphQL is de-activated.
14+
*
15+
* This cleans up data that WPGraphQL stores.
16+
*/
17+
function deactivation_callback(): callable {
18+
return static function (): void {
19+
// Fire an action when WPGraphQL is de-activating.
20+
do_action( 'graphql_gf_deactivate' );
21+
};
22+
}

0 commit comments

Comments
 (0)