Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

3.0 #1

Open
wants to merge 44 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
625436c
started working on v2.0
kilhage Nov 5, 2015
79bb95b
started adding support for multiple vardefs
kilhage Nov 5, 2015
8cb2791
Added dump command
kilhage Nov 10, 2015
0bbcad2
fixed issues wheh dumping change directives
kilhage Nov 10, 2015
5590d99
Updated command descriptions
kilhage Nov 10, 2015
c601475
Updated UPGRADE-2.0.md
Nov 11, 2015
cd8ed75
Updated README.md
Nov 11, 2015
9c4ccaf
Updated README.md
Nov 11, 2015
f9c83b4
Updated README.md
Nov 11, 2015
f396da0
Update README.md
Nov 11, 2015
3173456
Update README.md
Nov 11, 2015
581eab7
Update README.md
Nov 11, 2015
ce09e09
Update README.md
Nov 11, 2015
fe4665c
Update README.md
Nov 11, 2015
c813439
Update README.md
Nov 11, 2015
e650d41
Added upgrade note
kilhage Nov 11, 2015
635d3e7
Added upgrade note
kilhage Nov 11, 2015
4b56579
updated upgrade note
kilhage Nov 11, 2015
b38cea9
updated upgrade note
kilhage Nov 11, 2015
e76fe7d
Update UPGRADE-2.0.md
Nov 11, 2015
1b2ccae
minor syntax fix
kilhage Nov 11, 2015
6d857d4
Updated UPGRADE-2.0.md
Nov 11, 2015
ee1f626
Added twig templates
kilhage Nov 11, 2015
3a9f4f5
Added usage of twig templates and fixed minor issues
kilhage Nov 12, 2015
77833fa
Added dump support for duplicate_check
kilhage Nov 12, 2015
d2a4be0
Fixed phpdoc
kilhage Nov 12, 2015
a8965cf
Broke out yaml parsing to separate library
kilhage Nov 12, 2015
c0c33e6
Made it possible to have different logic dependantly of version tag i…
kilhage Nov 12, 2015
a04bbb6
Made sure to set the link side properly
kilhage Jan 28, 2016
75b0a1d
fixed flex relate field
kilhage Apr 26, 2016
dececaa
simplifed making relationships readonly
kilhage Apr 26, 2016
68dc2bb
Merge branch 'master' into 2.0
kilhage Apr 28, 2016
ca8b881
added support for acls & visibillity, added --core flag in dump command
kilhage Jun 27, 2016
fbdff38
fixed minor issues in the template
kilhage Jul 14, 2016
4df6203
fix
kilhage Jul 19, 2016
f243ee2
Merge branch '2.0' of gitlab.dri-nordic.com:dri-nordic/vardef-modifie…
kilhage Jul 19, 2016
9983c90
made it possible to configure flex relate links
kilhage Jul 20, 2016
148c401
Merge branch '2.0' of gitlab.dri-nordic.com:dri-nordic/vardef-modifie…
kilhage Jul 20, 2016
9d3a559
relate fields should not be reportable
kilhage Apr 24, 2017
80446d7
updated namespace
kilhage Nov 14, 2017
6708689
Added check for index length
kilhage Feb 27, 2019
9811807
upgraded symfony
kilhage Apr 19, 2019
622ca3c
set default for bool fields
kilhage Jul 4, 2019
f18381c
made it possible to set index name
kilhage Oct 9, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
*.svn

/vendor/
112 changes: 96 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,34 +1,114 @@
sugarcrm-vardef-modifier
vardef-modifier
========

About
---------------------
# About

* __Author:__ Emil Kilhage
* __Date Created:__ 2012-04-24
* __License:__ MIT

See vardefs.example.yml for some syntax references.

Installation
---------------------
# Installation

# Install in project
Add the dependency to composer.json:

git submodule add [email protected]:dri-nordic/vardef-modifier.git docroot/custom/include/VardefModifier
```json
{
"require": {
"dri-nordic/vardef-modifier": "~2.0@dev"
},
"repositories": [
{
"type": "composer",
"url": "https://packages.dricrm.com/"
}
]
}
```

# Install in module
And run:

## Install in custom module
```bash
composer install
```

php docroot/custom/include/VardefModifier/install.php DRI_Invoices -c
Composer will install the library to your project's `vendor/dri-nordic/vardef-modifier` directory.

## Install in core module
# Usage

php docroot/custom/include/VardefModifier/install.php Accounts
Run the help command for full documentation about available commands:

Todo
---------------------
```bash
bin/vardef-modifier help
```

* Make it possible to install as composer dependency
* Make it possible to export .yml definitions to php files
## install

Run the help command as the command name as the first parameter for full documentation about the command:

```bash
bin/vardef-modifier help install
```

### Install in custom module

```bash
bin/vardef-modifier install -m DRI_Invoices -c
```

### Install in core module

```bash
bin/vardef-modifier install -m Accounts
```

## dump

### normal usage

```bash
bin/vardef-modifier dump DRI_Workflows modules/DRI_Workflows/vardefs.yml dri-customer-journey
```

### use the dump command from outside of Sugar

```bash
bin/vardef-modifier dump -T ~/www/sugarcrm-7.6.0.0 DRI_Workflows modules/DRI_Workflows/vardefs.yml dri-customer-journey
```

## migrate

NOT FINISHED

Migrates the target directory to the current version of the library

### List files that needs to be migrated

```bash
bin/vardef-modifier migrate:find
```

### Attempt to automatically migrate files

```bash
bin/vardef-modifier migrate:write
```

### Attempt to automatically migrate files

```bash
bin/vardef-modifier migrate:write --force
```

## setup

NOT FINISHED

Installs the library in the target directory

### List files that needs to be migrated

```bash
bin/vardef-modifier setup
```
97 changes: 97 additions & 0 deletions UPGRADE-2.0.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
UPGRADE FROM 1.x to 2.0
=======================

### Composer support

In v2.0 the VardefModifier can be included as a composer dependency

```json
{
"require": {
"dri-nordic/vardef-modifier": "~2.0"
},
"repositories": [
{
"type": "composer",
"url": "https://packages.dricrm.com/"
}
]
}
```

### Submodule no longer supported

If you have these situations where you can not include the library as a composer dependency you should rather use this tool from outside of the project and dump the vardef definitions trough the `dump` command

If you still need to include the library as a submodule, please make sure that the `1.2` branch is used and not `master` or any `2.0` branch as this may break existing code.

### Namespace

The VardefModifier class has been moved into its own namespace and is now referenced like this

\DRI\SugarCRM\VardefModifier\VardefModifier

### Commands

All commands previously accessed in the root of the repo has been moved into using symfony's console framework

The old install command was used like this:

```bash
install.php Accounts Contacts
install.php DRI_Config --core
```

The new command is used like this:

```bash
bin/vardef-modifier install -m Accounts -m Contacts
bin/vardef-modifier install -m DRI_Config --core
```

Here is the full help of the new install command, run this command your self for the latest help, also look at the other documentation for a more complete overview of this

```bash

bin/vardef-modifier help install

Usage:
install [options]

Options:
-F, --force
-C, --core
-D, --dry
-Y, --only-yml
-P, --only-php
-m, --module=MODULE (multiple values allowed)
-N, --name[=NAME]
-T, --target[=TARGET] target sugar path that should be used as context, defaults to the current working directory
-h, --help Display this help message
-q, --quiet Do not output any message
-V, --version Display this application version
--ansi Force ANSI output
--no-ansi Disable ANSI output
-n, --no-interaction Do not ask any interactive question
-v|vv|vvv, --verbose Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug

Help:
Installs an empty yaml vardef addition for a module

```

A few new commands has also been added, to see what is available run:

bin/vardef-modifier help

### Migration

Use the migration command to find and reinstall the vardef inclusions of the library

#### List files that needs to be migrated

bin/vardef-modifier migrate --find

#### Attempt to automatically migrate files

bin/vardef-modifier migrate --write
5 changes: 0 additions & 5 deletions VardefModifier/Exception.php

This file was deleted.

14 changes: 0 additions & 14 deletions VardefModifier/Exception/UnableToWriteCacheFile.php

This file was deleted.

14 changes: 0 additions & 14 deletions VardefModifier/Exception/UnsupportedDefaultsType.php

This file was deleted.

14 changes: 0 additions & 14 deletions VardefModifier/Exception/UnsupportedModule.php

This file was deleted.

Loading